Liking cljdoc? Tell your friends :D
All platforms.

dk.simongray.colour-coded.target

Colours found by the contrast that they should have, by the method of Adobe's Leonardo: a search for the lightness at which a colour has the contrast asked for with a background, since the same lightness has a different contrast at each hue. https://github.com/adobe/leonardo

Colours found by the contrast that they should have, by the method of
Adobe's Leonardo: a search for the lightness at which a colour has the
contrast asked for with a background, since the same lightness has a
different contrast at each hue.
https://github.com/adobe/leonardo
raw docstring

at-contrastclj/s

(at-contrast x background)
(at-contrast x background r)

The colour x at the OKLCH lightness where its contrast ratio with the background is r or just over, or nil where no lightness reaches r. By default r is 4.5, which WCAG 2.2 asks of text. The colour keeps its hue and as much chroma as sRGB allows. Where a darker and a lighter colour would both do, it's the one nearer the lightness of x.

The colour `x` at the OKLCH lightness where its contrast ratio with the
`background` is `r` or just over, or nil where no lightness reaches `r`. By
default `r` is 4.5, which WCAG 2.2 asks of text. The colour keeps its hue and
as much chroma as sRGB allows. Where a darker and a lighter colour would both
do, it's the one nearer the lightness of `x`.
sourceraw docstring

scaleclj/s

(scale x background)
(scale x background rs)

The colour x at each contrast ratio of rs with the background, as at-contrast finds it. By default the ratios are [1.5 3 4.5 7], a ramp from a decoration to AAA's text.

The colour `x` at each contrast ratio of `rs` with the `background`, as
at-contrast finds it. By default the ratios are [1.5 3 4.5 7], a ramp from a
decoration to AAA's text.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close