prizm-0.3.0.0: A haskell library for computing with colors

Safe HaskellSafe-Inferred

Data.Prizm.Color

Synopsis

Documentation

(<|>) :: (CIELCH Double, CIELCH Double) -> CIELCH DoubleSource

Blend two colors using an interpolation value of 50%.

shade :: CIELCH Double -> Percent -> CIELCH DoubleSource

Shade a color by blending it using a weight and the color black.

tint :: CIELCH Double -> Percent -> CIELCH DoubleSource

Tint a color by blending it using a weight and the color white.

darken :: CIELCH Double -> Percent -> CIELCH DoubleSource

Darken a color by converting it to CIE L*a*b* first, multiplying it by the weight, and then subtracting that value from the original L* value and converting the whole back to XYZ.

lighten :: CIELCH Double -> Percent -> CIELCH DoubleSource

Lighten a color by converting it to CIE L*a*b* first, multiplying it by the weight, and then adding that value to the original L* value and converting the whole back to XYZ.

interpolate :: Percent -> (CIELCH Double, CIELCH Double) -> CIELCH DoubleSource

Interpolate two colors

Weight is applied left to right, so if a weight of 25% is supplied, then the color on the left will be multiplied by 25% and the second color will be multiplied by 75%.

CIE L*Ch is used because the interpolation between the colors is more accurate than L*ab, XYZ, and sRGB color spaces.