| Did you know ... | Search Documentation: |
| Get methods |
<-kind
colour against the colour database on first access.
<-hue
selects the basic colour (think of it as a position on the rainbow);<-saturnation
is how intense the colour is — 0 is grey, 100 is fully saturated;<-value
is brightness — 0 is black, 100 is white. HSV is more convenient than
RGB for shading and palette arithmetic. Colours may be created in this
space via
colour->initialise
with model=hsv. Reasoning in colour spaces is beyond the
scope of this manual.(20*R + 32*G + 18*B) / 70
which closely matches ITU‑R BT.601 luma.
Useful for converting colour to a monochrome substitute.
|int -> int.0..1.0] ->
colour.0..1.0] ->
colour Return a lighter (colour<-hilite)
or darker (colour<-reduce)
variant. Used by class elevation to derive the lit and
shadow sides of a 3-D box. 0.0 returns the
colour unchanged; 1.0 returns white (colour<-hilite)
or black (colour<-reduce).
Defaults come from the hilite_factor / reduce_factor
class variables.
The derived colour is associated with the original; asking for the same modification again returns the cached object, and destroying the original lets the derivative go.
# and has 3, 4, 6 or 8 hex
digits after it, interpret it as a CSS hex literal:
#c0453f -> R=192, G=69, B=63, A=255
With three or four hex digits, each digit is doubled (#abc
≡ #aabbcc). With four or eight digits the trailing byte
is the alpha channel.
|int],
red=[0..360], green=[0..255], blue=[0..255], alpha=[0..255], model=[{rgb,hsv}] -> colour->initialise.<-kind,
return its colour<-name.
Otherwise return #RRGGBB (or #RRGGBBAA when
alpha is not 255). The result is suitable as input to colour<-convert.
See also object<-storage_reference, object->save_in_file
and source_sink<-object.