Calculating Hexadecimals

Can anyone explain how to do calculations in hexadecimal?<br />
<br />
Say for instance that I have a variable which I know is a hexadecimal value, and I want to calculate a new colour from this variable, which will be a slightly darker shade of the original colour... can I calculate this directly in hexadecimal (and if so how?) or do I need to convert everything into decimals, calculate, and then convert back again (and if so, how do I convert?)<br />
<br />
I hope this questions makes sense..can anyone tell me how to go about this?<!--content-->This article explains (briefly) about hexadecimal: <!-- m --><a class="postlink" href="http://mathworld.wolfram.com/Hexadecimal.html">http://mathworld.wolfram.com/Hexadecimal.html</a><!-- m --><br />
<br />
You can perform calculations using hex but for anything complex, it's probably easier to convert if you are doing it manually. For making colours darker, it's fairly simple - just reduce all the digits slightly, bearing in mind that after 9 the "digits" go A,B,C,D,E,F.<br />
<br />
Adam<!--content-->Thanks for answering so quickly Adam, that's great.<!--content-->
 
Back
Top