<Gradient> / Element reference
Gradient
The Gradient element in IDML: where it appears (Resources/Graphic), its 8 attributes, their values, and how real documents use them.
Definition
A gradient swatch, Linear or Radial, with its colour stops as GradientStop children.
- Lives in
Resources/Graphic272- Frequency
- In 272 of the 305 documents of the census (89.2%), 2026-10-12
- Attributes
- 8 observed, 5 of them vary between documents
- Discussed in
- Color & swatches, Apply a gradient fill, Cookbook, Gradients & tints, Glossary and How the parts reference each other
Structure
Relationships
Gradient sits: the elements that hold it, and the elements it holds. Each number is the documents that show the pairing (census of 2026-10-12, 305 documents).Attributes
| Attribute | Type | Values | Seen in |
|---|---|---|---|
| Name# The name InDesign shows for the object in its panels. References between objects use Self, never the name. | builtin or text | any | 100% varies in 27 |
| Self# The object's ID, unique within the document. An attribute that refers to this object holds this value. | reference to Gradient | any | 100% varies in 119 |
| Type# The gradient's shape: Linear or Radial. | keyword | Linear272Radial5 | 100% varies in 5 |
| ColorEditable# Whether the swatch's colour can be changed in InDesign; built-in swatches such as Registration can't. | boolean | true271 | 99.6% |
| ColorRemovable# Whether the swatch can be deleted; built-in swatches can't. | boolean | true271 | 99.6% |
| SwatchCreatorID# | integer | any | 99.6% |
| Visible# Whether the swatch is listed in the Swatches panel. It does not change how anything that uses it looks. | boolean | false271true22 | 99.6% varies in 22 |
| SwatchColorGroupReference# The swatch's entry in a colour group, a ColorGroupSwatch by Self; n when it is in none. | text | any | 97.4% varies in 8 |
Gradient (census of 2026-10-12, 305 documents). Seen in is the share of the 272 documents with a Gradient that set the attribute; varies in counts those that hold a value other than the most common one. Values are listed, with the documents using each, only where documents use a small closed set. A name with a dotted underline links to the chapter that explains it. How the census counts.Evidence
- Observed
- In 272 of 305 documents (89.2%):
Resources/Graphic272. - Census
- Taken 2026-10-12 over 305 documents (34 written by test generators, 267 from template packs, 4 samples). It observed 281 elements; this reference gives 195 of them an entry. How the census counts
- Counts are
- Documents, not occurrences. Values are published only for small closed sets; numbers only by kind.
Paged support
What Paged, one implementation of the format, does with Gradient. Nothing in this panel is part of the format; the reference above holds for any reader.
As of: scriptable paths from engine release v0.77.0; parse and write from the importer and exporter at paged 6347aa9, read 2026-11-24; render from the capability record exported 2026-11-24.
- Parse
- Reads 3 of the 8 attributes
- Render
- One feature of the capability record names this element (below)
- Edit
- 2 attributes map to a scriptable path for
paged.set - Write
- Writes 3 of the 8 attributes on IDML export
By attribute
| Attribute | Parse | Edit | Write |
|---|---|---|---|
| Name | readsgraphic.rs:233 | name | writesresources.rs:175 |
| Self | readsgraphic.rs:222 | — | writesresources.rs:173 |
| Type | readsgraphic.rs:223 | kind | writesresources.rs:177 |
| ColorEditable | not read | — | not written |
| ColorRemovable | not read | — | not written |
| SwatchCreatorID | not read | — | not written |
| Visible | not read | — | not written |
| SwatchColorGroupReference | not read | — | not written |
In the capability record
| Feature | Parse | Render | Edit | Evidence |
|---|---|---|---|---|
| Gradient feather shipped | yes | yes | yes | All linked evidence is passing (2 tests current) |
Parse and write come from the idml-coverage record, which reads the importer and exporter source; each mark links to the line. Render is recorded per feature, not per attribute. A feature is listed when its title in the record names Gradient.
DashedStrokeStyle
The DashedStrokeStyle element in IDML: where it appears (Resources/Graphic), its 8 attributes, their values, and how real documents use them.
GradientStop
The GradientStop element in IDML: where it appears (Resources/Graphic), its 4 attributes, their values, and how real documents use them.