Wiki Page Content

Differences between revisions 14 and 15
Revision 14 as of 2010-09-03 00:02:44
Size: 1399
Editor: SheenaSmith
Comment: update formatting - categories
Revision 15 as of 2010-09-16 04:30:54
Size: 1306
Editor: SheenaSmith
Comment: update content (w/ Sam); remove 'draft' note
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 6: Line 5:
A structure that contains color information. A structure that represents a color.
Line 14: Line 13:
||<style="color: #808080;">Uint8||<style="color: #808080;">'''unused'''||<style="color: #808080;">32 bit placeholder|| ||<style="color: #808080;">Uint8||<style="color: #808080;">'''unused'''||<style="color: #808080;">||
Line 29: Line 28:
*<<BR>>[[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]]().<<BR>>* [[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]]().

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

unused

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, CategoryPixels

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