|
|
|
Description |
This module provides Colour, which stores RGB (red, green, blue)
colour values where each channel is a Double. It also provides
arithmetic over such colours, and a few predefined colours.
|
|
Synopsis |
|
|
|
Documentation |
|
|
The Colour type. Stores a red, a green and a blue component as
strict, unboxed Double values. (So it should be quite efficient
in time and space.) Also provides various class instances for
arithmetic, etc. It is generally assumed that each channel will
have a value somewhere between 0 and 1 at all times.
Note that (*) acts channel-wise. This is usually what is wanted.
| Constructors | | Instances | |
|
|
|
Apply a function to every channel in a colour. (Mostly used
internally, but exposed here in case it may be useful.)
|
|
|
This is similar to Data.List.zipWith. (Mostly used internally,
but exposed here in case it may be useful.)
|
|
|
Use a function to collapse a Colour into a Double. No
particular order of application is promised.
|
|
|
Turn a Double into a shade of grey.
|
|
|
Scale a Colour by a specified amount. (That is, change the
brightness while not affecting the shade.)
|
|
|
Take a Colour and clip all channels to the range 0--1
inclusive. Any value outside that range will be replaced
with the nearest endpoint (i.e., 0 for negative numbers,
1 for positive numbers higher than 1). Values inside
the range are unaffected.
|
|
|
Constant: Black.
|
|
|
Constant: Red.
|
|
|
Constant: Yellow.
|
|
|
Constant: Green.
|
|
|
Constant: Cyan.
|
|
|
Constant: Blue.
|
|
|
Constant: Magenta.
|
|
|
Constant: White.
|
|
Produced by Haddock version 2.4.2 |