How to determine/calculate the "branding" colour for the Citrix Web Interface and the Citrix Access Gateway (CAG)

There are many freeware toosl available from such places as the following URLs:

http://www.freeware-guide.com/dir/web/design.html
http://www.nonags.com/nonags/htmlcolor.html

I have found ColourPic (http://www.iconico.com/colorpic/) to be a really good freeware one.

However, whilst these tools provide you with the HTML hex code ready for direct insertion into your style sheets, they don't explain how the code is derrived.

The HTML colour code is a hex code represented by #rrggbb, where:

rr is the colour code for red in hex
gg is the colour code for green in hex
bb is the colour code for blue in hex

So once you know the red, green and blue number, simply convert these decimal numbers to hex.

To convert them manually simply divide by 16 using integer division.

  1. Divide the decimal number by 16. Treat the division as an integer division.
  2. Write down the remainder (in hexadecimal).
  3. Divide the result again by 16. Treat the division as an integer division.
  4. Repeat step 2 and 3 until result is 0.
  5. The hex value is the digit sequence of the remainders from the last to first.

For Example: Convert 238 from Decimal to Hex

238/16 = 14 with the remainder being 14, or E in hex
14/16 = 0 with the remainder being 14, or E in hex

Therefore, 238 Decimal = EE Hex

Or you can use the scientific mode of the calculator (calc.exe) for this. These numbers will give you the correct hex code for an exact colour match to the customers logo.

 


    9th April 2007