A pixel colour, 8 bit per channel; w is used only by four-channel orders.
More...
#include <ws2812_rmt_types.hpp>
|
| constexpr uint32_t | Packed () const noexcept |
| |
|
| static constexpr Colour | FromPacked (uint32_t rgb) noexcept |
| | A colour from 0xRRGGBB.
|
| |
| static constexpr Colour | FromPackedW (uint32_t wrgb) noexcept |
| | A colour from 0xWWRRGGBB.
|
| |
|
|
uint8_t | r {0} |
| | Red.
|
| |
|
uint8_t | g {0} |
| | Green.
|
| |
|
uint8_t | b {0} |
| | Blue.
|
| |
|
uint8_t | w {0} |
| | White.
|
| |
|
|
constexpr bool | operator== (const Colour &lhs, const Colour &rhs) noexcept=default |
| | Hidden friend: exact member comparison.
|
| |
A pixel colour, 8 bit per channel; w is used only by four-channel orders.
◆ FromPacked()
| static constexpr Colour ws2812_rmt::Colour::FromPacked |
( |
uint32_t |
rgb | ) |
|
|
inlinestaticconstexprnoexcept |
A colour from 0xRRGGBB.
- Parameters
-
| rgb | Packed colour; the top byte is ignored. |
- Returns
- The colour, white 0.
◆ FromPackedW()
| static constexpr Colour ws2812_rmt::Colour::FromPackedW |
( |
uint32_t |
wrgb | ) |
|
|
inlinestaticconstexprnoexcept |
A colour from 0xWWRRGGBB.
- Parameters
-
| wrgb | Packed colour with the white byte on top. |
- Returns
- The colour.
◆ Packed()
| constexpr uint32_t ws2812_rmt::Colour::Packed |
( |
| ) |
const |
|
inlineconstexprnoexcept |
- Returns
0xRRGGBB, white ignored.
The documentation for this struct was generated from the following file: