From 1531116036d1b5e0d2482ff2c8d77ad21f1d2bef Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 12 Apr 2018 20:35:30 +0200 Subject: Add random-color. --- pict.scm | 4 ++++ 1 file changed, 4 insertions(+) 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" -- cgit v1.2.3