# Monochrome algorithm

The monochrome operator converts a single color echogram into a luminance grayscale image.

## Color echograms

Data values are represented in color echograms as three 8-bit values storing BBGGRR where BB, GG and RR are two digit hexadecimal numbers for the blue, green and red components respectively. Echoview reports amount of red, green and blue respectively for the component color of each data point in the data panels of the toolbar.

## Monochrome echograms

Monochrome echograms are grayscale representations of the luminance of each data point within a color echogram. This is calculated by:

Luminance = 0.2125R + 0.7154G + 0.0721B

Where:

R = decimal value of the red color component of a data point

G = decimal value of the green color component of a data point

B = decimal value of the blue color component of a data point

The resulting echogram is a color echogram with red, green and blue components all equal, chosen such that the luminance of the result is as calculated using the red, green and blue values from the operand.

Note: The NTSC phosphor standard is 0.30 R + 0.59 G + 0.11 B, but Akenine-Moller & Haines (2002) recommend the above calculation for modern CRT phosphors.