How do I convert RGB to HEX?
Convert each of the three channels (0 to 255) into a two-digit base-16 number, padding with a leading zero when needed, then join them after a hash. For rgb(37, 99, 235): 37 is 25, 99 is 63 and 235 is eb, so the HEX code is #2563eb.