Represents colors that can be used with Addressable LEDs.
More...
#include <frc/util/Color8Bit.h>
Represents colors that can be used with Addressable LEDs.
◆ Color8Bit() [1/4]
constexpr frc::Color8Bit::Color8Bit |
( |
| ) |
|
|
constexprdefault |
Constructs a default color (black).
◆ Color8Bit() [2/4]
constexpr frc::Color8Bit::Color8Bit |
( |
int |
r, |
|
|
int |
g, |
|
|
int |
b |
|
) |
| |
|
inlineconstexpr |
Constructs a Color8Bit.
- Parameters
-
r | Red value (0-255) |
g | Green value (0-255) |
b | Blue value (0-255) |
◆ Color8Bit() [3/4]
constexpr frc::Color8Bit::Color8Bit |
( |
const Color & |
color | ) |
|
|
inlineconstexpr |
◆ Color8Bit() [4/4]
Constructs a Color8Bit from a hex string.
- Parameters
-
hexString | a string of the format #RRGGBB |
- Exceptions
-
std::invalid_argument | if the hex string is invalid. |
◆ FromHexString()
Create a Color8Bit from a hex string.
- Parameters
-
hexString | a string of the format #RRGGBB |
- Returns
- Color8Bit object from hex string.
- Exceptions
-
std::invalid_argument | if the hex string is invalid. |
◆ HexString()
constexpr auto frc::Color8Bit::HexString |
( |
| ) |
const |
|
inlineconstexpr |
Return this color represented as a hex string.
- Returns
- a string of the format
#RRGGBB
◆ operator Color()
constexpr frc::Color8Bit::operator Color |
( |
| ) |
const |
|
inlineconstexpr |
◆ operator==()
constexpr bool frc::Color8Bit::operator== |
( |
const Color8Bit & |
| ) |
const |
|
constexprdefault |
◆ blue
int frc::Color8Bit::blue = 0 |
◆ green
int frc::Color8Bit::green = 0 |
◆ red
int frc::Color8Bit::red = 0 |
The documentation for this class was generated from the following file: