paged.IDML Reference
Color & swatches

Color & swatches

How an IDML document keeps its colours in one palette in Graphic.xml, which elements the palette holds, and how a fill or stroke resolves to a colour.

Tier: IntermediateIntermediateIIexplanation

An IDML document keeps its colours in one palette; every fill and stroke names a palette entry by id.

In short Resources/Graphic.xml holds the palette: colours, named tints, gradients and the reserved "no paint" swatch. A rectangle, a run of text or a table cell carries no channel values of its own. It names an entry in FillColor or StrokeColor, and may scale it with a tint. Change the entry and everything that names it follows. How the numbers look on screen also depends on the colour profiles named on the <Document> element.

What the palette holds

Graphic.xml is a flat list keyed by Self id:

  • <Color>: a colour in CMYK, RGB or Lab, printed as process, as a spot ink, or, for the reserved Registration colour, on every plate.
  • <Tint>: a named tint, a colour at a fixed percentage, pointing at its base colour.
  • <Gradient>: a blend whose <GradientStop> children point at colours.
  • <Swatch>: in InDesign's files, Swatch/None, the absence of paint.

The same part lists the document's inks (<Ink>), which output uses. Colour groups, the folders of the Swatches panel, are kept in designmap.xml.

How a fill resolves

A shape with FillColor="Color/Red" is filled with whatever Color/Red defines. The id can name a <Color> or a <Tint>, which give a flat colour; a <Gradient>, which the shape then places with its own angle and length; or Swatch/None, which means no fill. A FillTint on the shape scales the colour for that shape only.

A CMYK red defined once in the palette and applied to a rectangle by FillColor.

Resources/Graphic.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<idPkg:Graphic xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="20.0">
  <Color Self="Color/Black" Model="Process" Space="CMYK" ColorValue="0 0 0 100" ColorOverride="Specialblack" Name="Black" ColorEditable="false" ColorRemovable="false" Visible="true"/>
  <Color Self="Color/Paper" Model="Process" Space="CMYK" ColorValue="0 0 0 0" ColorOverride="Specialpaper" Name="Paper" ColorEditable="true" ColorRemovable="false" Visible="true"/>
  <Color Self="Color/Red" Model="Process" Space="CMYK" ColorValue="0 100 100 0" ColorOverride="Normal" Name="Red" ColorEditable="true" ColorRemovable="true" Visible="true"/>
</idPkg:Graphic>

Pages in this chapter

  • Colors & swatches: <Color> and <Swatch>, the Model, Space and ColorValue spellings, the reserved colours.
  • Gradients & tints: <Gradient>, <GradientStop>, how a shape places a gradient, the <Tint> element and FillTint.
  • Spot & process color: how spot inks are previewed, mixed inks, overprint and colour groups.
  • Colour management: the profiles and rendering intents on <Document>, and why rendering needs the profiles.

Transparency is a separate axis from colour: opacity and blend modes are covered in effects & transparency.

Frequently asked questions

Where does an IDML document store its colours? In Resources/Graphic.xml, as <Color>, <Tint>, <Gradient> and <Swatch> elements. Page items name these by Self id; they hold no colour values themselves.

How does a shape's fill become a colour? FillColor names a palette entry. A colour or tint gives a flat colour, a gradient is placed by the shape's gradient attributes, and Swatch/None means no fill. FillTint can lighten it for that shape.

Why can the same file show different colours in different programs? CMYK and RGB values are converted to the screen through the colour profiles the document names. A program without those profiles has to approximate.

On this page