a package:colour
Compute a affine Combination (weighted-average) of points. The last
parameter will get the remaining weight. e.g.
affineCombo [(0.2,a), (0.3,b)] c == 0.2*a + 0.3*b + 0.5*c
Weights can be negative, or greater than 1.0; however, be aware that
non-convex combinations may lead to out of gamut colours.
Change the type used to represent the colour coordinates.
c1 `atop` c2 returns the
AlphaColour produced by
covering the portion of
c2 visible by
c1. The
resulting alpha channel is always the same as the alpha channel of
c2.
c1 `atop` (opaque c2) == c1 `over` (opaque c2)
AlphaChannel (c1 `atop` c2) == AlphaChannel c2
This type represents a
Colour that may be semi-transparent.
The
Monoid instance allows you to composite colours.
x `mappend` y == x `over` y
To get the (pre-multiplied) colour channel of an
AlphaColour
c, simply composite
c over black.
c `over` black
darken s c blends a colour with black without changing it's
opacity.
For
Colour,
darken s c = blend s c mempty
This
AlphaColour is entirely transparent and has no associated
colour channel.
Creates an
AlphaColour from a
Colour with a given
opacity.
c `withOpacity` o == dissolve o (opaque c)
Change the type used to represent the chromaticity coordinates.
Returns the CIE little x, little y, little z
coordinates for the 2° standard (colourimetric) observer.
Returns the CIE little x coordinate for the 2° standard
(colourimetric) observer.
Returns the CIE little y coordinate for the 2° standard
(colourimetric) observer.
Returns the CIE little z coordinate for the 2° standard
(colourimetric) observer.
Returns the colour for given CIELAB coordinates, which is a
perceptually uniform colour space. If you don't know what white point
to use, use
d65.