For more information including compatibility, examples and test cases, see https://github.com/petercrlane/r7rs-libs
0.1. Resene Colour System: (import (slib resene))
This library provides a mapping of colour names to colour values (as defined in (slib color)
)
based on the Resene colour system. For more information see http://www.resene.co.nz
Two functions are provided:
-
resene-names
returns a list of all the names -
resene
returns the named colour
sash[r7rs]> (import (slib resene)) #<unspecified> sash[r7rs]> (length (resene-names)) 1379 sash[r7rs]> (list-ref (resene-names) 0) "mantis" sash[r7rs]> (list-ref (resene-names) 100) "st tropaz" sash[r7rs]> (resene "mantis") #<<color> 0x2d78ea0> sash[r7rs]> (color->string (resene "mantis")) ; <1> "sRGB:127/193/92" sash[r7rs]> (resene (list-ref (resene-names) 100)) #<<color> 0xd6fa40> sash[r7rs]> (color->string (resene (list-ref (resene-names) 100))) "sRGB:50/84/130" sash[r7rs]> (resene "rnd") ; <2> #f
-
color→string
is available from the(slib color)
library -
resene
returns#f
if the name is not recognised