Common types

class ColorRgb(r, g, b)

RGB color (from 0.0 to 1.0). This is equivalent to (r, g, b) tuple.

RGB color (from 0.0 to 1.0). This is equivalent to (r, g, b) tuple.

classmethod from_hex(hex_str)

Transform hexadecimal string to corresponding RGB color (from 0.0 to 1.0)

Parameters

hex_str -- String (Format:#FFFF00 which need to be converted to RGB color

Raises

ValueError -- If character # is missing at the beginning of the hexadecimal string.

property hex

RGB Color value as hexadecimal string

Type

str, read-only

class ColorLab(l, a, b)

Lab color. This is equivalent to (l, a, b) tuple.

a

The a chrominance value (from -128.0 to 128.0).

Type

float

b

The b chrominance value (from -128.0 to 128.0).

Type

float

l

The luminance value (from 0.0 to 100.0).

Type

float

class Vector3(x, y, z)

3D vector float. This is equivalent to (x, y, z) tuple.

3D vector float. This is equivalent to (x, y, z) tuple.

normalize()