[GRASS5] Hex equivalents of grass colors?

Glynn Clements glynn at gclements.plus.com
Mon Apr 17 04:21:49 EDT 2006


Michael Barton wrote:

> This is fine. But what I need is to translate from the GRASS color names to
> hex, not RGB, so that they can be used in TclTk canvases and text. Do you
> want to put another proc into gui.tcl for this?

	proc color_grass_to_hex {color} {
	    eval format #%02X%02X%02X [color_grass_to_rgba255 $color]
	}

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list