Wiki Page Content

Differences between revisions 8 and 10 (spanning 2 versions)
Revision 8 as of 2010-08-24 18:31:27
Size: 1388
Editor: SheenaSmith
Comment: temp test
Revision 10 as of 2010-08-24 18:37:11
Size: 1388
Editor: SheenaSmith
Comment: temp test
No differences found!

DRAFT

SDL_Color

A structure that contains color information.

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

unused

32 bit placeholder

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.

  • Example: orange = 255,165,0 so set r=255, g=165, b=0.

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

  • Example: orange = #FFA500 so set r=0xFF, g=0xA5, b=0x00.

*
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 (Pixels)

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

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit