@metreeca/tile
    Preparing search index...

    Module palettes

    Palette tokens.

    Names the colours a chart, a coding or a map reads: four ten-step scales, nine series slots and four area classes. A step, a slot or a class says where a value sits or which thing it belongs to, and never stands in for a role, which says what a colour means in the interface.

    Colour scales — where a colour stands for a position rather than for a role, a ten-step scale provides it: colorGray* for a neutral, colorSubtle* and colorStrong* for a branded one, and colorHeat* for a magnitude. The number is the share of the anchor the step carries, so 010 is the faintest and 100 the anchor itself, and the three derived scales follow an app retuning the anchors. A step is not a replacement for a role token: the text and background roles do not land on the ladder.

    The heat scale — it carries literals of its own, cool blue through green and red to a violet extremum standing for a measure past the top of its range. Its hue carries the reading and its lightness does not, so a step means a band a legend names, never a position on a continuous gradient, and a consumer states the band in text beside the colour. Text over a step takes the page colour color up to 070 and the page background backgroundColor from 080 on. A continuous gradient needs a monotone scale of its own.

    Series slots — colorSeries1 to colorSeries9 tell one thing apart from another, on a bar, a line or a wedge. A number is a slot rather than a share: the slots stand in a fixed order, taken in sequence and held to the thing each one paints, so a filter dropping a series leaves the survivors their colours. Their separation under simulated colour vision deficiency is what the order buys, so reordering or resampling them forfeits it, and a state is told in the role that names it rather than in a slot. Nine hold where only neighbours are compared; where every pair is compared, on a scatter, a bubble chart or a map, the first three hold and a fourth thing is faceted rather than coloured. One value serves both colour schemes; four of the nine stay under 3:1 against the light page, so a chart carrying them states its figures in text as well, through direct labels or a table view.

    Area classes — colorArea1 to colorArea4 fill a shape rather than draw a mark: a region on a choropleth, a band on a terrain, a cell on a grid. They come as two pairs, a light and a dark of one hue each, so the members of a pair are told apart by lightness where hue alone would fail, and the two hues read as two families; that pairing is what a greyscale print survives on. Every pair of classes meets on a shared boundary, so the four are held to the all-pairs measure rather than the adjacent one, and four is the limit: a fifth class is a second map, never a fifth colour. The two pale classes stay under 3:1 against the light page, so a map keeps its boundaries drawn and names its classes in the legend.

    palettes

    The custom property behind every palette token.