[racket] image-color?

From: Stephen Bloch (sbloch at adelphi.edu)
Date: Tue Feb 1 16:07:38 EST 2011

On Feb 1, 2011, at 8:59 AM, Todd O'Bryan wrote:

> It appears that image-color? from 2htdp/image returns true no matter
> what string you give it.
> Is there some other function that actually checks to see if a color is defined?

There's name->color in the picturing-programs package.  It returns a struct:color (with red, green, blue, and alpha components) if the name is recognized, and false if it's not.

Stephen Bloch
sbloch at adelphi.edu

Posted on the users mailing list.