here's the conversion for decimal to hexadecimal (I know you already got solution) but just so you can be all cool 😛
character 1 of the hex value is
the original number divided by 16
character 2 of the hex value is the remainder of the original number divided by 16
now if you get a value of 10 or over, you start using letters.
where:
A is 10
B is 11
C is 12
D is 13
E is 14
F is 15
so, take for example the number 55
55 / 16 is 3.4375 we only take the whole number (always round down) so the first digit is 3
now to find the remainder, easiest way is to do R = 55 - (3 * 16) which is 7 (you could also multiply the decimal part of the original number - 0.4375 - by 16 to get the reamainder)
so therefore the hex value for 55 is 37
now for hex back to dec, you just do the process in reverse.
so if you have any letters in the hex number, convert them over to the numerical value as outlined above (A=10, B=11,...F=15)
now, multiply the first digit by 16 and add the second digit.
so take, for example the hex number C4
C is 12, so multiply 12 by 16 to get 192 and add 4 to get 196
therefore the decimal value for the hexadecimal number C4 is 196
and of course, the breakdown of the hexadecimal colour codes we use in web design is #RRGGBB, so to find the RGB values, you just take the RR part, find the dec value of it. take the GG part, find the dec value of it. then take the BB part and find the dec value of it.
easy 🙂