The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



RGBtoGray


Unit:SDL_sdlcolors
Class:none
Declaration:function RGBtoGray (r, g, b: integer): integer;

The function RGBtoGray transforms a color defined in the RGB color space by the parameters r (red, valid range: 0..255), g (green, valid range: 0..255), and b (blue, valid range: 0..255) into the gray scale color space. The function returns values between 0 (black) and 255 (white).

Hint: Please note that the gray scale is calculated according to common television standards.



Last Update: 2023-Feb-06