[GRASS5] Hex equivalents of grass colors?
Glynn Clements
glynn at gclements.plus.com
Sun Apr 16 05:49:09 EDT 2006
Michael Barton wrote:
> OK. Using Glynn's version of RGB equivalents for GRASS colors, below is a
> TclTk procedure to convert to hex.
>
> Cedrick,
>
> Do you want to put it into gui.tcl? How to reference it from other routines?
>
> Michael
> __________________________________________
> Michael Barton, Professor of Anthropology
> School of Human Evolution & Social Change
> Center for Social Dynamics & Complexity
> Arizona State University
>
> phone: 480-965-6213
> fax: 480-965-7671
> www: http://www.public.asu.edu/~cmbarton
>
> ##### grass colors to hex in TclTk
> proc { gcolor } {
[snip]
Just use an array:
array set gcolors {
white #ffffff
black #000000
red #ff0000
green #00ff00
blue #0000ff
yellow #ffff00
magenta #ff0080
cyan #00ffff
aqua #6480ff
grey #afafaf
gray #afafaf
orange #ff8000
brown #b44d19
violet #ff00ff
indigo #0080ff
}
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list