Method SDL.PixelFormat()->map_rgba()
- Method
map_rgba
intmap_rgba(intr,intg,intb,inta)
intmap_rgba(Image.Color.Colorcolor,inta)- Description
Maps the RGBA 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 - Parameter
a 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