Method SDL.PixelFormat()->map_rgb()
- Method
map_rgb
intmap_rgb(intr,intg,intb)
intmap_rgb(Image.Color.Colorcolor)- Description
Maps the RGB color value to the specified pixel format and returns the pixel value as an integer.
If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.
If the pixel format has an alpha component it will be returned as all 1 bits (fully opaque).
- Parameter
r - Parameter
g - Parameter
b The red, green and blue components specified as an integer between 0 and 255.
- Parameter
color The color as represented by an Image.Color.Color object.
- Returns
A pixel value best approximating the given RGB color value for a given pixel format.
- See also