br_colour
Blue occupies bits 0 to 7, Green occupies bits 8 to 15, Red occupies bits 16 to 23, and Alpha occupies bits 24 to 31.
Note that in some situations, a colour of zero is considered transparent (See br_material
151
br_pixelmap
272
).
typedef
colour.h
for precise declaration and ordering)
unsigned long int br_colour Packed RGBA values
Arithmetic
Binary operations (And &
, Or |
, Not ~
, XOr ^
) may sometimes be useful. However, all operands should still be colours, and if necessary, constructed using BR_COLOUR_RGB()
. Comparison
Only equality comparisons are valid between colours. Conversion
From individual component values
Returns a BR_COLOUR_RGB(r,g,b)
br_colour
111 given three 8-bit colour components.
Returns a BR_COLOUR_RGBA(r,g,b,a)
br_colour
111 given three 8-bit colour components and an 8-bit alpha component.
To component values
Returns the Red component of a colour (0..255).BR_RED(c)
Returns the Green component of a colour (0..255).BR_GRN(c)
Returns the Blue component of a colour (0..255).BR_BLU(c)
Returns the Alpha component of a colour (0..255).BR_ALPHA(c)
Copy/Assign
Only assign colours.
Generated with CERN WebMaker