Liking cljdoc? Tell your friends :D

clojure2d.color.blend

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.
raw docstring

addclj

(add a b)

Add channel values (clamped).

Add channel values (clamped).
sourceraw docstring

alpha-blendingclj

(alpha-blending cb cs blend)
source

andclj

(and a b)

Bitwise and of channel values.

Bitwise `and` of channel values.
sourceraw docstring

averageclj

(average a b)

Average of two channel values.

Average of two channel values.
sourceraw docstring

blend-colorsclj

(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).
sourceraw docstring

blend-gradientsclj

(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.
sourceraw docstring

blend-palettesclj

(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.
sourceraw docstring

blendsclj

source

blends-listclj

List of all blending functions.

List of all blending functions.
sourceraw docstring

burnclj

(burn a b)

Burn mode (clamped).

Burn mode (clamped).
sourceraw docstring

ch0clj

(ch0 cb cs)
(ch0 colorspace cb cs)
source

ch1clj

(ch1 cb cs)
(ch1 colorspace cb cs)
source

ch2clj

(ch2 cb cs)
(ch2 colorspace cb cs)
source

colorclj

(color cb cs)
source

darkenclj

(darken a b)

Darken mode.

Darken mode.
sourceraw docstring

differenceclj

(difference a b)

Difference mode.

Difference mode.
sourceraw docstring

divideclj

(divide a b)

Divide channel values (clamped).

Divide channel values (clamped).
sourceraw docstring

dodgeclj

(dodge a b)

Dodge mode (clamped).

Dodge mode (clamped).
sourceraw docstring

exclusionclj

(exclusion a b)

Exclusion mode.

Exclusion mode.
sourceraw docstring

freezeclj

(freeze a b)

Freeze mode (clamped).

Freeze mode (clamped).
sourceraw docstring

glowclj

(glow a b)

Glow mode (clamped).

Glow mode (clamped).
sourceraw docstring

hardlightclj

(hardlight a b)

Hard light mode.

Hard light mode.
sourceraw docstring

hardmixclj

(hardmix a b)

Hard mix channel values.

Hard mix channel values.
sourceraw docstring

heatclj

(heat a b)

Heat mode (clamped).

Heat mode (clamped).
sourceraw docstring

hueclj

(hue cb cs)
source

inverseburnclj

(inverseburn a b)

Inverse burn mode (clamped).

Inverse burn mode (clamped).
sourceraw docstring

inversedodgeclj

(inversedodge a b)

Inverse dodge mode (clamped).

Inverse dodge mode (clamped).
sourceraw docstring

lightenclj

(lighten a b)

Lighten mode.

Lighten mode.
sourceraw docstring

linearburnclj

(linearburn a b)

Linear burn mode (clamped).

Linear burn mode (clamped).
sourceraw docstring

linearlightclj

(linearlight a b)

Linear light mode (clamped).

Linear light mode (clamped).
sourceraw docstring

luminocityclj

(luminocity cb cs)
source

maddclj

(madd a b)

Add channel values (mod 255).

Add channel values (mod 255).
sourceraw docstring

mburnclj

(mburn a b)

Burn mode (mod 255).

Burn mode (mod 255).
sourceraw docstring

mdivideclj

(mdivide a b)

Divide channel values (mod 255).

Divide channel values (mod 255).
sourceraw docstring

mdodgeclj

(mdodge a b)

Dodge mode (mod 255).

Dodge mode (mod 255).
sourceraw docstring

mfreezeclj

(mfreeze a b)

Freeze mode (mod 255).

Freeze mode (mod 255).
sourceraw docstring

mglowclj

(mglow a b)

Glow mode (mod 255).

Glow mode (mod 255).
sourceraw docstring

mheatclj

(mheat a b)

Heat mode (mod 255).

Heat mode (mod 255).
sourceraw docstring

minverseburnclj

(minverseburn a b)

Inverse burn mode (mod 255).

Inverse burn mode (mod 255).
sourceraw docstring

minversedodgeclj

(minversedodge a b)

Inverse dodge mode (mod 255).

Inverse dodge mode (mod 255).
sourceraw docstring

mlinearburnclj

(mlinearburn a b)

Linear burn mode (mod 255).

Linear burn mode (mod 255).
sourceraw docstring

mlinearlightclj

(mlinearlight a b)

Linear light mode (mod 255).

Linear light mode (mod 255).
sourceraw docstring

mreflectclj

(mreflect a b)

Reflec mode (mod 255).

Reflec mode (mod 255).
sourceraw docstring

msoftburnclj

(msoftburn a b)

Soft burn mode (mod 255).

Soft burn mode (mod 255).
sourceraw docstring

msoftdodgeclj

(msoftdodge a b)

Soft dodge mode (mod 255).

Soft dodge mode (mod 255).
sourceraw docstring

mstampclj

(mstamp a b)

Stamp mode (mod 255).

Stamp mode (mod 255).
sourceraw docstring

msubtractclj

(msubtract a b)

Subtract channel values (mod 255).

Subtract channel values (mod 255).
sourceraw docstring

multiplyclj

(multiply a b)

Multiply channel values.

Multiply channel values.
sourceraw docstring

mvividlightclj

(mvividlight a b)

Vivid light mode (mod 255).

Vivid light mode (mod 255).
sourceraw docstring

negationclj

(negation a b)

Negation mode.

Negation mode.
sourceraw docstring

normalclj

(normal _ b)

Return second value only.

Return second value only.
sourceraw docstring

orclj

(or a b)

Bitwise or of channel values.

Bitwise `or` of channel values.
sourceraw docstring

overlayclj

(overlay a b)

Overlay mode.

Overlay mode.
sourceraw docstring

pegtoplightclj

(pegtoplight a b)

Pegtop soft light mode.

Pegtop soft light mode.
sourceraw docstring

pinlightclj

(pinlight a b)

Pin light mode.

Pin light mode.
sourceraw docstring

reflectclj

(reflect a b)

Reflect mode (clamped).

Reflect mode (clamped).
sourceraw docstring

saturationclj

(saturation cb cs)
source

screenclj

(screen a b)

Screen mode.

Screen mode.
sourceraw docstring

softburnclj

(softburn a b)

Soft burn mode (clamped).

Soft burn mode (clamped).
sourceraw docstring

softdodgeclj

(softdodge a b)

Soft dodge mode (clamped).

Soft dodge mode (clamped).
sourceraw docstring

softlightclj

(softlight a b)

Soft light mode.

Soft light mode.
sourceraw docstring

stampclj

(stamp a b)

Stamp mode (clamped).

Stamp mode (clamped).
sourceraw docstring

subtractclj

(subtract a b)

Subtract channel values (clamped).

Subtract channel values (clamped).
sourceraw docstring

vividlightclj

(vividlight a b)

Vivid light mode (clamped).

Vivid light mode (clamped).
sourceraw docstring

xorclj

(xor a b)

Bitwise xor of channel values.

Bitwise `xor` of channel values.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close