Colours chosen from among others, e.g. the colours of an image or those that a designer made, and a small scheme for a UI chosen from them.
Colours chosen from among others, e.g. the colours of an image or those that a designer made, and a small scheme for a UI chosen from them.
(chroma x)The chroma of the colour x in OKLCH: 0 for a grey, and about 0.3 at
most in sRGB.
The chroma of the colour `x` in OKLCH: 0 for a grey, and about 0.3 at most in sRGB.
(chromatic? x)(chromatic? x c)Whether the colour x has an OKLCH chroma of at least c, by default
0.04, which off-whites and near-greys don't.
Whether the colour `x` has an OKLCH chroma of at least `c`, by default 0.04, which off-whites and near-greys don't.
(first-with-contrast xs background)(first-with-contrast xs background r)The first colour of xs whose contrast ratio with the background is at
least r, or nil. By default r is 4.5, which WCAG 2.2 asks of text. It
asks 3 of a control.
The first colour of `xs` whose contrast ratio with the `background` is at least `r`, or nil. By default `r` is 4.5, which WCAG 2.2 asks of text. It asks 3 of a control.
(most-contrast xs background)The colour of xs that contrasts most with the background.
The colour of `xs` that contrasts most with the `background`.
(scheme xs)The colours of a UI by the colours xs, which list the most common first,
e.g. those of an image: a map of these, or nil for no colours.
The colours of a UI by the colours `xs`, which list the most common first, e.g. those of an image: a map of these, or nil for no colours. - :background, the most common colour, to tint by - :text, black or white, whichever reads better on the background - :accent, for controls, e.g. a progress bar: the first other colour whose contrast with the background is 3:1, which WCAG 2.2 asks of a control, or else the background's complement in HSL when its contrast is, or else the text colour - :on-accent, black or white, whichever reads better on the accent - :seed, the first colour with a hue, by seed, or nil
(seed xs)The first chromatic colour of xs, which lists the most common first, to
derive the colours of a UI from, or nil where every colour is about grey.
The first chromatic colour of `xs`, which lists the most common first, to derive the colours of a UI from, or nil where every colour is about grey.
(spread xs)(spread xs d)The colours of xs that differ from every colour kept before them by a ΔEOK
of at least d, by default 0.1, which is clearly apart.
The colours of `xs` that differ from every colour kept before them by a ΔEOK of at least `d`, by default 0.1, which is clearly apart.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |