|
|
|
Description |
Datatypes for representing the human perception of colour.
Includes common operations for blending and compositing colours.
The most common way of creating colours is either by name
(see Data.Colour.Names) or by giving an sRGB triple
(see Data.Colour.SRGB).
Methods of specifying Colours can be found in
|
|
Synopsis |
|
|
|
Documentation |
|
|
This type represents the human preception of colour.
The a parameter is a numeric type used internally for the representation.
| Instances | |
|
|
|
Change the type used to represent the colour coordinates.
|
|
|
This type represents a Colour that may be semi-transparent.
| Instances | |
|
|
|
Creates an opaque AlphaColour from a Colour.
|
|
|
Returns a AlphaColour more transparent by a factor of o.
|
|
|
Creates an AlphaColour from a Colour with a given opacity.
c `withOpacity` o == fade o (alphaColour c)
|
|
|
This AlphaColour is entirely transparent and has no associated
colourChannel.
|
|
|
Change the type used to represent the colour coordinates.
|
|
|
Returns the opacity of an AlphaColour.
This function is provided only for converting to other datatypes.
Its use is discouraged.
Instead compose the AlphaColour with another Colour and extract
the resulting Colour components.
|
|
|
Returns the colour of an AlphaColour.
colourChannel transparent is undefined and may result in nan or an
error.
This function is provided only for converting to other datatypes.
Its use is discouraged.
Instead compose the AlphaColour with another Colour and extract the
resulting Colour components.
|
|
class AffineSpace f where | Source |
|
| Methods | affineCombo :: Num a => [(a, f a)] -> f a -> f a | Source |
| 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.4*c
|
| | Instances | |
|
|
|
Compute the weighted average of two points.
e.g.
blend 0.4 a b = 0.4*a + 0.6*b
|
|
|
| Methods | | | Instances | |
|
|
|
Composites c1 over c2 using opacity a.
|
|
Produced by Haddock version 2.6.0 |