Re: What is the meaning for format #%02x%02x%02x
- From: Neil Madden <nem@xxxxxxxxxxxxx>
- Date: Sun, 30 Sep 2007 14:56:24 +0100
parag_paul@xxxxxxxxxxx wrote:
when you say
format #%02x%02x%02x [<some input command>] [same] [same]
What is the purpose of the above
It formats three numbers as 2 digit hexadecimal strings with leading 0s used if the number only consists of a single digit in hex. The '#' is just a literal character. Read the format man page for more information: http://tmml.sourceforge.net/doc/tcl/format.html . For example, suppose your input commands returned the numbers 255, 100, and 37, then you'd get back a string "#ff6425", where FF in hex = 255 in decimal, 64 hex = 100 decimal, and 25 hex = 37 decimal.
At a guess, I'd say the code is producing RGB colour values for use in HTML/CSS.
-- Neil
.
- References:
- What is the meaning for format #%02x%02x%02x
- From: parag_paul@xxxxxxxxxxx
- What is the meaning for format #%02x%02x%02x
- Prev by Date: What is the meaning for format #%02x%02x%02x
- Next by Date: Re: May be a bit of a dumbo
- Previous by thread: What is the meaning for format #%02x%02x%02x
- Index(es):
Relevant Pages
|