|
Size: 536
Comment: create page, add content
|
Size: 1388
Comment: temp test
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| ||<tablewidth="100%" style="color: #FF0000;" :> DRAFT|| | |
| Line 10: | Line 11: |
| ||Uint8||'''r'''|| ||Uint8||'''g'''|| ||Uint8||'''b'''|| ||Uint8||'''unused'''|| |
||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|| ||<style="color: #808080;">Uint8||<style="color: #808080;">'''unused'''||<style="color: #808080;">32 bit placeholder|| |
| Line 21: | Line 22: |
| [[SDL_Color]] and [[SDL_Colour]] are interchangeable. | [[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. *<<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>>* |
| Line 27: | Line 35: |
| .[[SDL_GetDisplayPalette]] .[[SDL_SetDisplayPalette]] |
|
| Line 28: | Line 38: |
| .[[SDL_GetTexturePalette]] .[[SDL_SetTexturePalette]] |
|
| Line 30: | Line 42: |
| [[CategoryStruct]] | [[CategoryStruct]] (Pixels) |
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().
*
Related Structures
Related Functions
CategoryStruct (Pixels)
