summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pict.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/pict.scm b/pict.scm
index dfa854a..a9ec612 100644
--- a/pict.scm
+++ b/pict.scm
@@ -96,6 +96,7 @@
;; colors
rgb
+ random-color
colors))
@@ -869,6 +870,9 @@ DX and DY."
(error "Color component values must be between 0 and 255."))
(format #f "rgb(~a,~a,~a)" r g b))
+(define (random-color)
+ (rgb (random 256) (random 256) (random 256)))
+
;; List of defined SVG color names
(define colors
(list "aliceblue" "antiquewhite" "aqua" "aquamarine" "azure" "beige"