Work in progress — this reference is being written in the open. Unfinished pages are excluded from search engines.
Paged · IDML Reference
Color & swatches

Gradients & tints

The <Gradient> and <GradientStop> elements, and the two ways a tint reaches a color — swatch-level TintValue and per-use FillTint.

Intermediate· reference

A gradient blends across two or more stops; a tint is a color used at less than full strength — and neither owns any color of its own.

In short: In IDML, a <Gradient> is a blend defined by its child <GradientStop> elements, each of which references an existing <Color> in the palette. A tint is the same palette color used at reduced strength, and it reaches a painted thing two ways: as a swatch-level TintValue baked into a spot color, or as a per-use FillTint on the element being painted. Both gradients and tints build on colors already in the palette rather than introducing new channel values. This page is the attribute-level reference for <Gradient>, <GradientStop>, and the two tint paths.

A gradient is a blend across two or more stops; a tint is a color used at less than full strength. Both build on the colors already in the palette — a gradient references existing <Color> swatches, and a tint scales one. Neither introduces new channel values of its own.

<Gradient>

A <Gradient> lives in Resources/Graphic.xml alongside the colors and is keyed by its Self id, so a shape paints it with FillColor="Gradient/<name>". The gradient itself carries only its kind; its colors come entirely from its child <GradientStop> elements.

Attribute · GradientType / valuesSupportNotes
Selfstring idSupportedThe lookup key, e.g. "Gradient/SkySun". A shape’s FillColor names this.
NamestringSupportedThe swatch name; informational.
TypeLinear | RadialSupportedThe blend geometry. Absent or unrecognized defaults to Linear. Both kinds render.

The renderer also reads two placement attributes off the shape the gradient is applied to — not off the gradient swatch — so the same gradient can sit differently on different shapes:

Attribute · GradientFill* (on the shape)Type / valuesSupportNotes
GradientFillAnglenumber (degrees)SupportedDirection of a linear gradient. 0° runs left→right, 90° top→bottom (IDML’s convention).
GradientFillLengthnumber (pt)SupportedPage-space length of the gradient line. Absent ⇒ the gradient spans the shape’s box.

<GradientStop>

Each <GradientStop> is a child of its <Gradient>. It references a color and places it along the blend. The parser collects the stops as it reads them and commits the whole list when the gradient's closing tag fires, so stop order is preserved.

Attribute · GradientStopType / valuesSupportNotes
StopColorstring idSupportedReference to a <Color> in the palette by its Self id. The stop has no color of its own.
Locationnumber 0–100SupportedPosition of the stop along the gradient, as a percentage of its length. The renderer normalizes this to 0–1.
Midpointnumber 13–87Parsed, not yet renderedWhere the halfway blend sits between this stop and the next. Read, but the renderer interpolates linearly between stops.

A gradient needs at least two stops; the renderer drops a gradient that resolves to fewer than two valid stops and the shape falls back to no gradient paint.

How stops blend

When the stops are CMYK (process, or spot with a CMYK alternate), the renderer interpolates in CMYK and converts each interpolated point through the ICC transform — matching how a press-oriented preview blends, rather than averaging in screen RGB, which would over-saturate the midtones. Stops in other spaces get a naive conversion into that path. Because Midpoint is not yet honored, the halfway color always sits at the geometric middle between two stops.

Parsed, not yet renderedGradientStop Midpoint

A gradient, defined and applied

The example adds two stop colors and one linear <Gradient> to the palette, then fills a rectangle with it at a 90° (top-to-bottom) angle. The shape carries no text or font, so the gradient renders directly in the live view.

A two-stop linear gradient in Graphic.xml, 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/Sun" Model="Process" Space="CMYK" ColorValue="0 15 90 0" ColorOverride="Normal" Name="Sun" ColorEditable="true" ColorRemovable="true" Visible="true"/>
  <Color Self="Color/Sky" Model="Process" Space="CMYK" ColorValue="70 25 0 0" ColorOverride="Normal" Name="Sky" ColorEditable="true" ColorRemovable="true" Visible="true"/>
  <Gradient Self="Gradient/SkySun" Type="Linear" Name="Sky to Sun" ColorEditable="true" ColorRemovable="true" Visible="true">
    <GradientStop Self="Gradient/SkySun/stop0" StopColor="Color/Sun" Location="0" Midpoint="50"/>
    <GradientStop Self="Gradient/SkySun/stop1" StopColor="Color/Sky" Location="100" Midpoint="50"/>
  </Gradient>
</idPkg:Graphic>

Tints: two paths to the same idea

A tint is a color at a reduced strength. It reaches a painted thing two distinct ways, and the difference matters:

  • Swatch-level tint — a spot <Color> can carry a TintValue (0–100) that bakes "this ink at N%" into the swatch itself. The renderer multiplies each CMYK-alternate channel by TintValue / 100 before conversion, so the swatch is the tinted color everywhere it is used. This is covered with the spot mechanics in spot & process color.
  • Per-use FillTint — the thing being painted (a frame, a run of text) can carry a FillTint percentage that scales whatever color it points at, only there. The same full-strength swatch can appear at 100% in one place and 40% in another.
Attribute · FillTint (on the painted element)Type / valuesSupportNotes
FillTintnumber 0–100SupportedPer-use strength of the fill color, independent of the swatch. 100 (or absent) ⇒ full strength.

The format also has a standalone <Tint> swatch — a named entry whose BaseColor points at the color it is a percentage of, with its own TintValue. The palette parser keys colors, swatches, gradients, and color groups; a dedicated <Tint> swatch is not yet captured as its own kind, so reach for the per-use FillTint or a spot TintValue instead. Not yet parsedstandalone <Tint> swatch

Frequently asked questions

Where do a gradient's colors come from? From its child <GradientStop> elements. The <Gradient> itself carries only its kind (Type); each stop references a <Color> in the palette by StopColor and places it along the blend with Location. The gradient owns no color of its own.

How many stops does a gradient need? At least two. If a gradient resolves to fewer than two valid stops, the renderer drops it and the shape falls back to no gradient paint.

What is the difference between a swatch-level tint and FillTint? A swatch-level TintValue bakes "this ink at N%" into a spot <Color> itself, so the swatch is the tinted color everywhere it is used. A per-use FillTint scales whatever color the painted element points at, only there — so the same full-strength swatch can appear at 100% in one place and 40% in another.

Why is my Midpoint or standalone <Tint> swatch not showing? GradientStop Midpoint is parsed but not yet honored, so the halfway color always sits at the geometric middle between two stops. The standalone <Tint> swatch is not yet captured as its own kind, so reach for a per-use FillTint or a spot TintValue instead.

On this page