class documentation
Represents an RGB color using 8-bit integer values.
Class Method | unpack |
Unpacks a bytes sequence into a tagColor object. |
Method | pack |
Packs the tagColor object into a bytes sequence. |
Class Variable | blue |
Undocumented |
Class Variable | green |
Undocumented |
Class Variable | red |
Undocumented |
Unpacks a bytes sequence into a tagColor object.
Parameters | |
data:bytes | The bytes to unpack, expected to be 3 bytes (3 uint8s). |
Returns | |
tagColor | A tagColor object. |
Raises | |
struct.error | If the input bytes are not the expected size (3 bytes). |
Packs the tagColor object into a bytes sequence.
Packs the red, green, and blue integer values (uint8) into a byte string. Uses little-endian byte order.
Returns | |
bytes | A bytes object representing the packed data (1 + 1 + 1 = 3 bytes). |