paged.IDML Reference
Color & swatches

Colors & swatches

The IDML Color and Swatch elements, the Model, Space and ColorValue spellings InDesign writes, and the reserved swatches every document carries.

Tier: ProProIIIreference

<Color> holds the channel values; <Swatch> is a named entry with no values of its own. Page items name either by its Self id.

In short The palette lives in Resources/Graphic.xml. A <Color> carries a Model (process, spot or registration), a Space (CMYK, RGB or LAB) and a ColorValue with the numbers for that space. A spot colour also carries an alternate. A <Swatch> is an entry such as Swatch/None, the "no paint" swatch. Every document carries the same handful of reserved colours, marked by ColorOverride. Named tints are a third element, <Tint>, covered on gradients & tints.

<Color>

Attribute · ColorValuesPagedpaged.set
ColorEditablefalse | truewritten
ColorOverrideHiddenreserved | Normal | Specialblack | Specialpaper | Specialregistrationwritten
ColorRemovablefalse | truewritten
ColorValuelist (pt)read · writtenvalue
ModelProcess | Spotread · writtenmodel
Nametextread · writtenname
SelfColor referenceread · written
SpaceCMYK | RGB | LAB | Grayread · writtenspace
Visiblefalse | truewritten
AlternateColorValuelist (pt)read · writtenalternateValue
The 10 attributes real documents use most. All 16 attributes of Color →

The attributes that decide the colour are Model, Space, ColorValue and, for a spot colour, AlternateSpace and AlternateColorValue. The rest is bookkeeping for the Swatches panel: Name, ColorEditable, ColorRemovable, Visible, SwatchCreatorID and the colour group a swatch belongs to.

Model

ValueMeaning
ProcessPrinted as a mix of the process inks. The model of almost every colour in real files.
SpotA named ink of its own, printed on its own plate.
RegistrationThe reserved Color/Registration, which prints on every plate.

Space and ColorValue

Space says how to read ColorValue, a space-separated list of numbers:

SpaceColorValueExample
CMYKfour percentages, C M Y K, each 0 to 1000 100 100 0
RGBthree components, R G B, each 0 to 255255 0 0
LABL from 0 to 100, then a and b, which can be negative46.27 20 33

InDesign spells the Lab space in capitals, LAB, and writes L with decimals. Of the 305 documents surveyed for this reference, every one has CMYK colours, 77 have RGB colours and 3 have Lab colours.

Spot colours and their alternate

A spot colour describes an ink that is not made from the process inks. Besides its own Space and ColorValue, it carries an alternate: AlternateSpace and AlternateColorValue, the colour to use where the ink itself is not available. InDesign writes AlternateSpace="NoAlternateColor" with an empty AlternateColorValue on process colours. Library spots, PANTONE colours for example, come with a Lab definition and a Lab alternate of the same value: PANTONE 300 C in a surveyed file has Model="Spot", Space="LAB", ColorValue="35.68627450980392 -10 -62", AlternateSpace="LAB" and the same numbers again in AlternateColorValue.

A spot defined in CMYK carries a CMYK alternate. How a viewer shows a spot colour on screen is covered on spot & process color.

TintValue on a colour is not a tint

A named tint is written as a <Tint> element. A TintValue attribute on a <Color> is not how InDesign stores one: InDesign drops the attribute when it opens the file, and the colour appears at full strength. Write tints as <Tint>.

In Paged: CMYK, RGB and Lab colours all render. A spot colour is previewed through its CMYK alternate when it has one, and otherwise from its Lab or RGB values. Mixed inks are recognised but not resolved to a colour. Paged also honours a TintValue on a <Color>, which InDesign does not. Supported · verified Parsed, partly rendered

<Swatch>

Attribute · SwatchValuesPagedpaged.set
ColorEditablefalsenot read
ColorRemovablefalsenot read
Nameenum / textread
SelfSwatch referenceread
Visibletruenot read
SwatchCreatorIDintegernot read
SwatchColorGroupReferencetextnot read
Colorreferenceread
The 8 attributes real documents use most. All 8 attributes of Swatch →

In InDesign's files the <Swatch> element is used for Swatch/None, the "no paint" swatch. A page item with FillColor="Swatch/None" has no fill: it is transparent there. The same spelling turns off a stroke. A Color attribute on a <Swatch> that names a <Color> makes the swatch an alias for that colour; one surveyed document has one.

The reserved colours

InDesign writes the same reserved entries into every document's Graphic.xml. They are <Color> elements whose ColorOverride marks their role:

SelfColorOverrideRole
Color/BlackSpecialblackProcess black, 100 % K. Not editable.
Color/PaperSpecialpaperThe colour of the paper. A fill of Paper covers what lies beneath it with the paper colour; it is not "no fill".
Color/RegistrationSpecialregistrationPrints on every plate, for crop and registration marks. Model="Registration".
Color/Cyan, Color/Magenta, Color/YellowHiddenreservedThe process primaries, hidden from the Swatches panel (Visible="false").
user coloursNormalEverything else.

Black and Paper appear in all 305 surveyed documents, the other reserved entries in the 271 that InDesign wrote; the remaining files come from a generator. A reader should still resolve Color/Black, Color/Paper and Swatch/None by name when a file leaves them out.

In Paged: the reserved swatches are recognised by their ids, so a file that omits them still resolves them. Parsed, not rendered

A color, defined and applied

The example adds one <Color> to the palette, a process CMYK red, 0 100 100 0, and fills a rectangle with it by naming its id in FillColor.

A CMYK colour defined in Graphic.xml 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>

Change ColorValue and the rectangle follows: the rectangle names the colour, and the numbers live in one place.

Frequently asked questions

What is the difference between <Color> and <Swatch>? A <Color> carries a model, a space and channel values. A <Swatch> carries no values; in InDesign's files it is the reserved Swatch/None, which means no paint.

How does IDML spell the Lab colour space? Space="LAB", in capitals, with ColorValue holding L, a and b, for example 46.27 20 33.

What does AlternateSpace="NoAlternateColor" mean? That the colour has no alternate. InDesign writes it on process colours, with an empty AlternateColorValue. Spot colours carry a real alternate, in Lab or CMYK.

Can I make a tint by adding TintValue to a <Color>? No. InDesign ignores that attribute and shows the colour at full strength. A named tint is a <Tint> element with BaseColor and TintValue.

Does a document have to define Black, Paper and None? InDesign always writes them. A reader should resolve them by name anyway, because files written by other tools sometimes leave them out.

On this page