Liking cljdoc? Tell your friends :D
All platforms.

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

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, interpolated in the space, by default Oklab, with a hue that turns as the hue-method says: :shorter, the default, :longer, :increasing or :decreasing.

A function that takes a progress from 0 to 1 and returns the colour that
far from the colour `a` to `b`, interpolated in the `space`, by default
Oklab, with a hue that turns as the `hue-method` says: :shorter, the
default, :longer, :increasing or :decreasing.
sourceraw docstring

mixclj/s

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

The colour p, from 0 to 1, of the way from the colour a to b, interpolated 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`, from 0 to 1, of the way from the colour `a` to `b`,
interpolated 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