noahzgordon / elm-color-extra / Color.Blending

Blending

Based on the Compositing and Blending Level 1

multiply : Color -> Color -> Color

The source color is multiplied by the destination color and replaces the destination.

The resultant color is always at least as dark as either the source or destination color. Multiplying any color with black results in black. Multiplying any color with white preserves the original color.

screen : Color -> Color -> Color

Multiplies the complements of the backdrop and source color values, then complements the result.

overlay : Color -> Color -> Color

Multiplies or screens the colors, depending on the backdrop color value.

difference : Color -> Color -> Color

Subtracts the darker of the two constituent colors from the lighter color.

exclusion : Color -> Color -> Color

Produces an effect similar to that of the Difference mode but lower in contrast. Painting with white inverts the backdrop color; painting with black produces no change

hardlight : Color -> Color -> Color

Multiplies or screens the colors, depending on the source color value. The effect is similar to shining a harsh spotlight on the backdrop.

softlight : Color -> Color -> Color

Darkens or lightens the colors, depending on the source color value. The effect is similar to shining a diffused spotlight on the backdrop.

colorBurn : Color -> Color -> Color

Darkens the backdrop color to reflect the source color. Painting with white produces no change.

colorDodge : Color -> Color -> Color

Brightens the backdrop color to reflect the source color. Painting with black produces no changes.

lighten : Color -> Color -> Color

Selects the lighter of the backdrop and source colors.

darken : Color -> Color -> Color

Selects the darker of the backdrop and source colors.