Blending modes functions for colors, gradients and palettes.
Great collection of blending functions for color channel values. Channel values should be from [0.0,255.0]
range.
Use blend-colors
, blend-palettes
and blend-gradients
to blend colors, palettes and gradients.
blend-colors
uses simple alpha blending strategy as described here.
Blending can be done separately for each channel.
Blending modes functions for colors, gradients and palettes. Great collection of blending functions for color channel values. Channel values should be from `[0.0,255.0]` range. Use [[blend-colors]], [[blend-palettes]] and [[blend-gradients]] to blend colors, palettes and gradients. [[blend-colors]] uses simple alpha blending strategy as described [here](https://www.w3.org/TR/compositing-1/#blending). Blending can be done separately for each channel.
(average a b)
Average of two channel values.
Average of two channel values.
(blend-colors blend-fn cb cs)
(blend-colors blend-fn1 blend-fn2 blend-fn3 cb cs)
Blend two colors using simple alpha composing.
Each channel can be blended using different function.
Formula from w3.org spec.
Blend two colors using simple alpha composing. Each channel can be blended using different function. Formula from [w3.org spec](https://www.w3.org/TR/compositing-1/#blending).
(blend-gradients blend-fn g1 g2)
(blend-gradients blend-fn1 blend-fn2 blend-fn3 g1 g2)
Blend two gradients.
Each channel can be blended using different function.
Blend two gradients. Each channel can be blended using different function.
(blend-palettes blend-fn pal1 pal2)
(blend-palettes blend-fn1 blend-fn2 blend-fn3 pal1 pal2)
Blend two palettes.
Each channel can be blended using different function.
Blend two palettes. Each channel can be blended using different function.
(divide a b)
Divide channel values (clamped).
Divide channel values (clamped).
(inverseburn a b)
Inverse burn mode (clamped).
Inverse burn mode (clamped).
(inversedodge a b)
Inverse dodge mode (clamped).
Inverse dodge mode (clamped).
(linearburn a b)
Linear burn mode (clamped).
Linear burn mode (clamped).
(linearlight a b)
Linear light mode (clamped).
Linear light mode (clamped).
(mdivide a b)
Divide channel values (mod 255).
Divide channel values (mod 255).
(minverseburn a b)
Inverse burn mode (mod 255).
Inverse burn mode (mod 255).
(minversedodge a b)
Inverse dodge mode (mod 255).
Inverse dodge mode (mod 255).
(mlinearburn a b)
Linear burn mode (mod 255).
Linear burn mode (mod 255).
(mlinearlight a b)
Linear light mode (mod 255).
Linear light mode (mod 255).
(msoftdodge a b)
Soft dodge mode (mod 255).
Soft dodge mode (mod 255).
(msubtract a b)
Subtract channel values (mod 255).
Subtract channel values (mod 255).
(mvividlight a b)
Vivid light mode (mod 255).
Vivid light mode (mod 255).
(softdodge a b)
Soft dodge mode (clamped).
Soft dodge mode (clamped).
(subtract a b)
Subtract channel values (clamped).
Subtract channel values (clamped).
(vividlight a b)
Vivid light mode (clamped).
Vivid light mode (clamped).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close