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))
1 Like