Liking cljdoc? Tell your friends :D

dk.simongray.colour-coded.mix

Colours between colours, interpolated by the rules that CSS Color 4 gives gradients and color-mix():

  • in Oklab, unless a space is given
  • with premultiplied alpha
  • with a missing component taken from the other colour
  • with a hue that turns the shorter way round, unless a method says otherwise

https://www.w3.org/TR/css-color-4/#interpolation

Colours between colours, interpolated by the rules that CSS Color 4
gives gradients and color-mix():

- in Oklab, unless a space is given
- with premultiplied alpha
- with a missing component taken from the other colour
- with a hue that turns the shorter way round, unless a method says
  otherwise

https://www.w3.org/TR/css-color-4/#interpolation
raw docstring

hue-methodsclj/s

The ways that a hue can turn from one colour to another, by CSS Color 4.

The ways that a hue can turn from one colour to another, by CSS Color 4.
sourceraw docstring

interpolateclj/s

(interpolate a b)
(interpolate a b space)
(interpolate a b space hue-method)

A function that takes a progress from 0 to 1 and returns the colour that far from the colour a to b. It interpolates in the space, by default Oklab, and turns a hue by the hue-method, one of hue-methods, by default :shorter.

A function that takes a progress from 0 to 1 and returns the colour that
far from the colour `a` to `b`. It interpolates in the `space`, by default
Oklab, and turns a hue by the `hue-method`, one of hue-methods, by default
:shorter.
sourceraw docstring

mixclj/s

(mix a b)
(mix a b p)
(mix a b p space)
(mix a b p space hue-method)

The colour p of the way from the colour a to b, where p runs from 0 to 1 and is by default 0.5. It interpolates in the space, by default Oklab, with the hue-method of interpolate. It's color-mix(in space, a, b p) with p as a percentage.

The colour `p` of the way from the colour `a` to `b`, where `p` runs from 0
to 1 and is by default 0.5. It interpolates in the `space`, by default Oklab,
with the `hue-method` of interpolate. It's color-mix(in space, a, b p) with p
as a percentage.
sourceraw docstring

stepsclj/s

(steps a b n)
(steps a b n space)
(steps a b n space hue-method)

The n colours evenly spaced from the colour a to b, both included, interpolated in the space, by default Oklab, with the hue-method of interpolate.

The `n` colours evenly spaced from the colour `a` to `b`, both included,
interpolated in the `space`, by default Oklab, with the `hue-method` of
interpolate.
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