diagrams-contrib-1.1.1.5: Collection of user contributions to diagrams EDSL

Copyright(c) 2013 Brent Yorgey
LicenseBSD-style (see LICENSE)
Maintainerbyorgey@cis.upenn.edu
Safe HaskellNone
LanguageHaskell2010

Diagrams.Color.HSV

Description

Utilities for working with color in HSV space.

Right now, the only utility is a function for blending colors in HSV space. This has the effect of "travelling around the color wheel", which can be especially nice when one wants to blend smoothly from one color to another (blending in RGB space can tend to travel across some icky brown/grey colors).

Synopsis

Documentation

hsvBlend :: (Floating a, RealFrac a, VectorSpace a) => Scalar a -> Colour a -> Colour a -> Colour a Source

Blend two colors in HSV space---that is, linearly interpolate between their hues, saturations, and values independently (wrapping around appropriately in the case of hue). In particular, hsvBlend a c1 c2 is like doing (a-1)*c1 + a*c2 in HSV space. That is, a parameter of 0 results in only the first color; 1 results in only the second color; and anything in between results in a blend.