]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-lib.scm
Doc & scm/: Music-functions and type-predicates.
[lilypond.git] / scm / output-lib.scm
index 04accee6652ee904a4e724caff31893520e13240..8e4697dd66b26a8d02b3289bd3312b58eda8e83e 100644 (file)
@@ -329,7 +329,12 @@ and duration-log @var{log}."
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Color
 
-(define-public color? list?)
+(define-public (color? x)
+  (and (list? x)
+       (= 3 (length x))
+       (apply eq? #t (map number? x))
+       (apply eq? #t (map (lambda (y) (<= 0 y 1)) x))))
+
 (define-public (rgb-color r g b) (list r g b))
 
 ; predefined colors