Decimal 15 is equal to F in hex. Decimal 16 is equal to 10 in hex. Decimal 17 is equal to 11 in hex. Decimal 255 is equal to FF in hex. Noting this difference, hopefully you can see why decimal is is sometimes also referred as base 10 numbering system, and hexadecimal is base 16 numbering system.
Most scientific calculator has a function to convert decimal to hex and vice versa.
Please be aware that you might not always get what you expect, even with web safe colors. To illustrate this point, please put your attention to the blue table cell above this text. The cell has a background color of 0099CC . 0099CC is a web safe color, so it's not obvious to me why it's dithered. This example is to show that even when using web safe colors, it is a good idea to test on as many browsers as possible.