if you have a two-digit hex value the maximum number is (16 * 16 + 16);
So if you divide 'h' by this value, you have it in range [0-1].
The I just added a '* 256' to get to the default [0-255] range.
...and the '/ 2' is somehow necessary, I don't know why.
Edit: make sure you read Wiseguy's post, we wrote something at the same time.
Last edited by Kartoffel; 05/27/13 18:20.