# `CPAL`: Color Palette table

The `CPAL` table is an OpenType table.

class fontTools.ttLib.tables.C_P_A_L_.table_C_P_A_L_(tag=None)

  Bases: `DefaultTable`

  Color Palette table

  The `CPAL` table contains a set of one or more color palettes. The color records in each palette can be referenced by the `COLR` table to specify the colors used in a color glyph.

  See also https://learn.microsoft.com/en-us/typography/opentype/spec/cpal

  NO_NAME_ID = 65535
  DEFAULT_PALETTE_TYPE = 0
  decompile(data, ttFont)
  compile(ttFont)
  toXML(writer, ttFont)
  fromXML(name, attrs, content, ttFont)
  prune_post_subset(font, options)

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

  Bases: `Color`

  hex()
  toXML(writer, ttFont, index=None)
  classmethod fromHex(value)
  classmethod fromRGBA(red, green, blue, alpha)