ItemRgb
Mojo struct 🡭
ItemRgb
Section titled “ItemRgb”@register_passable_trivialstruct ItemRgbBED itemRgb: either black (0) or (r,g,b) each 0-255.
Fields
Section titled “Fields”- r (
UInt8) - g (
UInt8) - b (
UInt8)
Implemented traits
Section titled “Implemented traits”AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDestructible, Movable, RegisterPassable, TrivialRegisterPassable, Writable
Methods
Section titled “Methods”__init__
Section titled “__init__”def __init__(r: UInt8, g: UInt8, b: UInt8) -> SelfArgs:
- r (
UInt8) - g (
UInt8) - b (
UInt8)
Returns:
Self
is_black
Section titled “is_black”def is_black(self) -> BoolTrue if 0,0,0 (or the single 0 value).
Args:
- self (
Self)
Returns:
Bool
write_to
Section titled “write_to”def write_to[w: Writer](self, mut writer: w)Parameters:
- w (
Writer)
Args:
- self (
Self) - writer (
w)