aboutsummaryrefslogtreecommitdiff
path: root/guile/starlet
diff options
context:
space:
mode:
Diffstat (limited to 'guile/starlet')
-rw-r--r--guile/starlet/colours.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/guile/starlet/colours.scm b/guile/starlet/colours.scm
index c7d1de0..f18b986 100644
--- a/guile/starlet/colours.scm
+++ b/guile/starlet/colours.scm
@@ -27,6 +27,7 @@
make-colour-rgb
colour-as-cmy
colour-as-rgb
+ colour-as-rgbw
cyan
magenta
@@ -117,6 +118,15 @@
(make-exception-with-irritants (colour-type col))))))))
+(define (colour-as-rgbw col)
+ (let ((rgb (colour-as-rgb col)))
+ (let ((w (apply min rgb)))
+ (list (- (red rgb) w)
+ (- (green rgb) w)
+ (- (blue rgb) w)
+ w))))
+
+
(define (colour-as-cmy col)
(let ((val (colour-value col)))
(case (colour-type col)