Luma - Maple Help

ColorTools[Color]

 Luma
 retrieve the luma of a Color object

 Calling Sequence Luma(color)

Parameters

 color - a Color object created with ColorTools[Color]

Description

 • The Luma command returns the luma of a Color object, which is a float between $0.$ and $1.0$ representing the lightness of a color with $1.0$ being white and $0.$ being black.
 • The calculation is performed using the formula $\mathrm{Y '}=0.3R+0.59G+0.11B$ where (R,G,B) is the RGB triple for the color.

Examples

 > $c≔\mathrm{ColorTools}:-\mathrm{Color}\left("green"\right)$
 ${c}{≔}{⟨}\colorbox[rgb]{0,1,0}{RGB : 0 1 0}{⟩}$ (1)
 > $\mathrm{Luma}\left(c\right)$
 ${0.590000000}$ (2)

Compatibility

 • The ColorTools[Color][Luma] command was introduced in Maple 2017.
 • For more information on Maple 2017 changes, see Updates in Maple 2017.