Re: What is the meaning for format #%02x%02x%02x



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
.



Relevant Pages

  • newbie: ABI and ELF
    ... I would like to know how the purpose of ABI differs from the ... formats be needed when machine ... I am a little bit fuzzy on why ABI and ELF exist. ...
    (comp.sys.arm)
  • Formatting Error
    ... I created a document in Word 2000 that consists of many different formats. ... I sent it to my client and she opened it in Word 2002 and the document was still in tact. ...
    (microsoft.public.word.application.errors)
  • Formatting Error
    ... I created a document in Word 2000 that consists of many different formats. ... I sent it to my client and she opened it in Word 2002 and the document was still in tact. ...
    (microsoft.public.word.docmanagement)
  • Re: Convert doc format to jpg
    ... What is the purpose? ... Bob Jones ... [MVP] ... formats please? ...
    (microsoft.public.word.drawing.graphics)