Color8Bit
- class wpiutil.Color8Bit(*args, **kwargs)
Bases:
pybind11_objectRepresents colors that can be used with Addressable LEDs.
Overloaded function.
__init__(self: wpiutil._wpiutil.Color8Bit) -> None
Constructs a default color (black).
__init__(self: wpiutil._wpiutil.Color8Bit, red: typing.SupportsInt | typing.SupportsIndex, green: typing.SupportsInt | typing.SupportsIndex, blue: typing.SupportsInt | typing.SupportsIndex) -> None
Constructs a Color8Bit.
- Parameters:
red – Red value (0-255)
green – Green value (0-255)
blue – Blue value (0-255)
__init__(self: wpiutil._wpiutil.Color8Bit, color: wpiutil._wpiutil.Color) -> None
Constructs a Color8Bit from a Color.
- Parameters:
color – The color
__init__(self: wpiutil._wpiutil.Color8Bit, hexString: str) -> None
Constructs a Color8Bit from a hex string.
- Parameters:
hexString – a string of the format <tt>#RRGGBB</tt> @throws std::invalid_argument if the hex string is invalid.
- static fromHexString(hexString: str) wpiutil._wpiutil.Color8Bit
Create a Color8Bit from a hex string.
- Parameters:
hexString – a string of the format <tt>#RRGGBB</tt>
- Returns:
Color8Bit object from hex string. @throws std::invalid_argument if the hex string is invalid.
- hexString() str
Return this color represented as a hex string.
- Returns:
a string of the format <tt>#RRGGBB</tt>
- toColor() wpiutil._wpiutil.Color