CLIM mail archive

[Prev][Next][Index][Thread]

Re: color definitions



In CLIM 2.0, you might want to try using:

clim:find-named-color name palette

This should give you the rgb color specific to the particular device the
palette is associated with. name should be a string which is one of the
"standard" X color names

clim-user(9): (find-named-color "khaki" (port-default-palette (find-port)))
#<clim-utils:rgb-color R=0.6784314 G=0.6627451 B=0.43137255 @ #x140e521>
clim-user(10): (setq *default-server-path* '(:motif :display "vapor:0"))
(:motif :display "vapor:0")
clim-user(11): (find-named-color "khaki" (port-default-palette (find-port)))
#<clim-utils:rgb-color R=0.9411765 G=0.9019608 B=0.54901963 @ #x140e5b9>
clim-user(12): 

Note that the rgb values for "khaki" are different on two different
displays. As long as you use the returned colors on the corresponding
displays then the colors should be consistent.

-----
Colin Meldrum, Franz Inc.	1995 University Avenue, Suite 275         
colin@Franz.COM (internet)	Berkeley, CA 94704                       
uunet!franz!colin (uucp)	Phone: (510) 548-3600; FAX: (510) 548-8253

References:

Main Index | Thread Index