RGB to HSV to RGB - for Shaders

TL;DR : Go here to get the RGB->HSV and HSV->RGB conversion functions for shaders. The other day I tried to tint a colour in a texture (or…