chickadee » web-colors » color-list?

color-list? x #!optional typesprocedure

Returns #t if x is a valid color list, i.e. a list containing a color type symbol and 4 numbers. It does not check that the numbers are in the typical range.

types can be a list of symbols to check that x is one of the specified color types. If types is omitted it defaults to +web-color-types+, so it checks for any supported color type.

(color-list? '(hsl 1 2 3 4))  ; → #t
(color-list? '(hsl 1 2 3 4) '(rgb rgb%))  ; → #f