Color codes conversion website (HEX, RGB(A), CMYK, HSL, HSB/HSV)

I love math and I enjoy diving into the logic of things that I use. Color codes are one of them. Every color can be represented by different types and each type has different properties/areas of usage. (For example in web development, we generally use HEX and RGB(a),while offset printing uses CMYK) So the question came to my mind; what's the math behind it? Note that: I am not an expert on color profiles, I am only interested in the conversion math.


For the blog post and the demo of this repo please visit: https://alitursucular.github.io/color-codes-conversion-website/