| Did you know ... | Search Documentation: |
| Send methods |
Named colours improve readability — @colour_names
maps well-known names (the SVG/CSS palette) to RGB triples. Names in the
form #RGB, #RGBA, #RRGGBB or #RRGGBBAA
are interpreted as CSS hex literals.
When name is @default,
the colour is built from the numeric components. The default model is rgb
and each component is an integer 0..255. The first component is
therefore named
red but actually carries the hue (0..360) when
model=hsv.
Examples:
new(C1, colour(red)) %% named new(C2, colour(@default, 255, 0, 0)) %% RGB triple new(C3, colour(@default, 180, 50, 50, 255, hsv)) %% HSV
See colour<-hue/colour<-saturnation/colour<-value
for the HSV model.
colour(@default, ...) literals can yield distinct objects
with identical components.