lightness = rgb2lightness(rgb)
converts RGB color values to lightness values, excluding the color components.
lightness is same as the L* component in the CIE 1976 L*a*b* color
space.
Converted lightness values, returned as an
m-by-n image array. If the input data type is
double, the output data type is double.
Otherwise, the output data type is single.