Declaring colour beyond red, green and blue
Name a separate ink, a measured colour or a profile, so the document speaks of it in more than three numbers.
Summary
A brand's blue is not a blue approximated on a screen: it is a precise pot of ink, ordered from the maker, with a number on it. A printing works lays it down as a separate ink, on top of the usual four, and it comes out the same on every run. A colour can also be described by its real measurement, the one an instrument takes in a laboratory, rather than by a recipe that only means something to a screen.
Technically
Written at the top level of a request, under
"color_spaces"
color_spaces declares the colour spaces written into the document, each under the name a colour selects it by. A device colour needs no declaration: three plain numbers are device red, green and blue wherever they appear. A spot ink, a measured space or a profiled one is written into the document before a colour names it. Eight kinds exist — /Separation for a spot ink, /DeviceN, /Indexed, /Lab, /CalRGB, /CalGray, /ICCBased and /Pattern, the space a repeating cell stating no colour of its own is laid down through — each stated by its own numbers, save the ICC space, whose profile arrives as a supplied part.
Request schema
-
color_spaces— array, optional, empty by default. -
color_spaces[].name— string, required. The name the request's colours select this space by. -
color_spaces[].space— object, required. Eight kinds:separation—colorantstring required;inkarray of four numbers optional;transformobject optional. Exactly one of the two: both together are refused, neither is refused too.indexed—baserequired, same recursive shape;entriesarray of bytes from 0 to 255 required, 256 entries at most.lab—white_pointthree numbers required;black_pointthree numbers optional;rangefour numbers optional, −100 to 100 by default.cal_gray—white_pointthree numbers required;black_pointoptional;gammanumber optional, 1 by default.cal_rgb—white_pointthree numbers required;black_pointoptional;gammathree numbers optional, 1 by default;primariesthree by three numbers optional.icc—profilestring required, the name of a supplied part;spaceoptional, otherwise read from the profile.device_n—colorants, an array of the inks' names as the press knows them, required;alternate, the space the tint lands in, andtint, the function turning the tints into a colour in it, taking as many numbers in as there are colorants and as many out asalternatetakes, both required;attributesoptional, what the inks look like one by one wheretintsays only what they look like together —colorants, a list of inks each said as aseparationis, andprocess, aspaceand onecomponentsname per component of it.pattern—baserequired, the space the colour the cell is laid down in is stated in, said either by the name of a device space (gray,rgb,cmyk) or in full as a declared space states itself. A pattern space is refused as the base. A colour in it is the numbers the base space takes and the name of the cell, so one cell is laid down in red here and in blue there.
-
transform—alternaterequired, the device space (gray,rgb,cmyk) the numbers the function gives are a colour in; andfunctionrequired, the function the tint is read through, written under the name of its kind, one number in and as many out asalternatetakes. The four kinds and their keys are the onesshadingsstates:exponential, withlowandhighrequired anddomain,exponentandrangeoptional,stitching,sampledandcalculation. -
A colour names a declared space through the shape
{"space": "the name", "components": n, …}. The short forms stay available:[g]for a grey,[r, g, b],[c, m, y, k], and{"gray": n}.
A whole request that creates a PDF
{
"color_spaces": [
{
"name": "brand_blue",
"space": {
"separation": {
"colorant": "Corporate Blue",
"ink": [0.92, 0.58, 0.0, 0.06]
}
}
}
],
"items": [
{
"type": "rect",
"rect": { "llx": 60, "lly": 700, "urx": 300, "ury": 780 },
"fill": { "space": "brand_blue", "components": [1.0] }
}
]
}
Colour and how it is shown
The device the colours are stated for Which plate of a separated sheet a page is The device one page's colours are stated for What a page's bare numbers mean A colour sliding into another Opacity, mixing, and what a press asks for A cell repeated to fill a shape The space a page mixes its colours in
Where to go next
Every JSON key of a request, in one page The other forty-one settings of a request