Skip to main content
Version: 4.16

colortype

This type can contain a color value. Note that in order to maintain backwards compatibility, casting this type to an integral value will yield a 16-bit value. To extract a 24/32-bit color from this type, use the getColor32 function.

Public Functions#

colortype()
Default constructor.
colortype(uint32_t col)
Constructor which creates a colortype with the given color.
FORCE_INLINE_FUNCTION uint32_tgetColor32() const
Gets color as a 32bit value suitable for passing to Color::getRedColor(), Color::getGreenColor() and Color::getBlueColor() which will handle all bitdeptchs.
operator uint32_t() const
Cast that converts the given colortype to an uint32_t.

Public Attributes#

uint32_tcolor
The color.

Public Functions Documentation#

colortype#

Default constructor.

Creates a black (0) color.

colortype#

colortype(uint32_tcol)

Constructor which creates a colortype with the given color.

Use Color::getColorFrom24BitRGB() to create a color that will work on your selected LCD type.

Parameters:
colThe color.
See also:

getColor32#

FORCE_INLINE_FUNCTION uint32_t getColor32()const

Gets color as a 32bit value suitable for passing to Color::getRedColor(), Color::getGreenColor() and Color::getBlueColor() which will handle all bitdeptchs.

Returns:

The color 32.

See also:

operator uint32_t#

Cast that converts the given colortype to an uint32_t.

Returns:

The result of the operation.

Public Attributes Documentation#

color#

uint32_t color

The color.