Color¶
Functions
- 
sfColor sfColor_fromRGB(uint8_t red, uint8_t green, uint8_t blue)¶
 Construct a color from its 3 RGB components.
- Parameters:
 red – Red component (0 .. 255)
green – Green component (0 .. 255)
blue – Blue component (0 .. 255)
- Returns:
 sfColor constructed from the components
- 
sfColor sfColor_fromRGBA(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha)¶
 Construct a color from its 4 RGBA components.
- Parameters:
 red – Red component (0 .. 255)
green – Green component (0 .. 255)
blue – Blue component (0 .. 255)
alpha – Alpha component (0 .. 255)
- Returns:
 sfColor constructed from the components
- 
sfColor sfColor_fromInteger(uint32_t color)¶
 Construct the color from 32-bit unsigned integer.
- Parameters:
 color – Number containing the RGBA components (in that order)
- Returns:
 sfColor constructed from the 32-bit unsigned integer
- 
uint32_t sfColor_toInteger(sfColor color)¶
 Convert a color to a 32-bit unsigned integer.
- Returns:
 Color represented as a 32-bit unsigned integer
- 
sfColor sfColor_add(sfColor color1, sfColor color2)¶
 Add two colors.
- Parameters:
 color1 – First color
color2 – Second color
- Returns:
 Component-wise saturated addition of the two colors
Variables
- 
struct sfColor¶
 - #include <Color.h>
Utility class for manpulating RGBA colors.