Helper function to detect the color model (HEX, RGB, HSL).