RGB values of a pixel

RGB(a, b, c) gives us a pixel. How do I input a pixel and extract the RGB components?

This might contain the information you need to tackle your problem.

There are getters for the type, but you could also access the fields of the type directly.

green(c::AbstractRGB ) = c.g

Thank you. I think I found my answer:

using accessor functions:

julia> c = imgc[1,1]; (red(c), green(c), blue(c))
(0.7550899f0,0.9650581f0,0.65485954f0)
1 Like