CPAL: Color Palette Table

class fontTools.ttLib.tables.C_P_A_L_.Color(blue, green, red, alpha)[source]

Bases: Color

alpha

Alias for field number 3

blue

Alias for field number 0

count(value, /)

Return number of occurrences of value.

classmethod fromHex(value)[source]
classmethod fromRGBA(red, green, blue, alpha)[source]
green

Alias for field number 1

hex()[source]
index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

red

Alias for field number 2

toXML(writer, ttFont, index=None)[source]
class fontTools.ttLib.tables.C_P_A_L_.table_C_P_A_L_(tag=None)[source]

Bases: DefaultTable

DEFAULT_PALETTE_TYPE = 0
NO_NAME_ID = 65535
compile(ttFont)[source]
decompile(data, ttFont)[source]
dependencies = []
fromXML(name, attrs, content, ttFont)[source]
merge(m, tables)
prune_post_subset(font, options)
toXML(writer, ttFont)[source]