Visual Response Equivalent Gray


The Visual Response Equivalent Gray is a single number that represents the perceived "gray" luminance of an RGB color. This is computed from an RGB triplet as the dot product of a standard weight vector (0.292, 0.594, 0.114) and the values of the RGB components, or L = 0.292 * R + 0.594 * G + 0.114 * B.

Example

Suppose an orange color is specified as (255,140,5). Using the above formula, the resulting gray intensity is 158.19. If this gray value were assigned to the pixel of an image of integer pixel type, the pixel value would be truncated to 158.

Related Topics

SetMathErrVal, CColorRef:ToGray


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.