class documentation

class tagColor: (source)

Constructor: tagColor.unpack(data)

View In Hierarchy

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
def unpack(cls, data: bytes) -> tagColor: (source)

Unpacks a bytes sequence into a tagColor object.

Parameters
data:bytesThe bytes to unpack, expected to be 3 bytes (3 uint8s).
Returns
tagColorA tagColor object.
Raises
struct.errorIf the input bytes are not the expected size (3 bytes).
def pack(self) -> bytes: (source)

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
bytesA bytes object representing the packed data (1 + 1 + 1 = 3 bytes).

Undocumented

Undocumented

Undocumented