,

Day 40: HEX to RGB

Today I updated my RGB to HEX converter to convert from HEX to RGB as well. I also made it so the RGB and HEX both update as you type. I did this with on input actions on both the RGB and HEX input.

I created a new function for HEX to RGB, and call it when the HEX input is changed. I change to HEX to RGB by splitting the HEX into sections, which are then converted to the associated number. The page can be found here: https://zidri.github.io/RGBtoHEX/ or on my GitHub.