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:

  1. resene-names returns a list of all the names

  2. 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
  1. color→string is available from the (slib color) library

  2. resene returns #f if the name is not recognised