aboutsummaryrefslogtreecommitdiff
path: root/guile/starlet/colours.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guile/starlet/colours.scm')
-rw-r--r--guile/starlet/colours.scm31
1 files changed, 30 insertions, 1 deletions
diff --git a/guile/starlet/colours.scm b/guile/starlet/colours.scm
index 5b2877a..b5ff71b 100644
--- a/guile/starlet/colours.scm
+++ b/guile/starlet/colours.scm
@@ -7,8 +7,21 @@
make-colour-rgb
colour-as-cmy
colour-as-rgb
+
+ cyan
+ magenta
+ yellow
+ red
+ green
+ blue
+
interpolate-colour
- white))
+ white
+
+ <colour-component-id>
+ colour-component-id?
+ colour-component-id
+ get-colour-component))
(define-class <colour> (<object>)
@@ -121,3 +134,19 @@
(make-exception-with-message
"Unrecognised colour interpolation type")
(make-exception-with-irritants interpolation-type))))))
+
+
+(define-class <colour-component-id> (<object>)
+ (component
+ #:init-form (error "Colour component must be specified")
+ #:init-keyword #:component
+ #:getter get-colour-component))
+
+
+(define (colour-component-id? a)
+ (is-a? a <colour-component-id>))
+
+
+(define (colour-component-id a)
+ (make <colour-component-id>
+ #:component a))