Self

SDL_Color

A structure that represents a color.

Data Fields

Uint8

r

the red component in the range 0-255

Uint8

g

the green component in the range 0-255

Uint8

b

the blue component in the range 0-255

Uint8

a

the alpha component in the range 0-255

Code Examples

You can add your code example here

Remarks

SDL_Color and SDL_Colour are interchangeable.

If you have RGB color values you would use decimal values in this struct.

If you have HTML color codes you would use hexidecimal values in this struct.

SDL_Color describes a color in a format independent way. You can convert an SDL_Color to a pixel value for a certain pixel format using SDL_MapRGB().


CategoryStruct, CategoryPixels

None: SDL_Color (last edited 2015-09-17 21:38:52 by PhilippWiesemann)