Qix-/color-convert


The issue has been closed
Hue component of HCG color is wrong by 120° then converting from RGB or CMYK #73
alex-knyaz posted onGitHub
Steps to reproduce
Here we are converting from RGB to HCG and then back. Note color components are very far apart.
var convert = require('color-convert') convert.hcg.rgb.raw(convert.rgb.hcg.raw([250, 0, 255])) [ 0, 255, 249.99999999999991 ]
Description
Then converting color to HCG from RGB or CMYK Hue component of the color appears to be offset by 120°.
Current behavior
var convert = require('color-convert') convert.rgb.hcg.raw([250, 0, 255]) [ 178.8235294117647, 100, 0 ]
Expected behavior
var convert = require('color-convert') convert.rgb.hcg.raw([250, 0, 255]) [ 298.8235294117647, 100, 0 ]
Cause?
https://github.com/Qix-/color-convert/blob/master/conversions.js#L668
4 is added twice. This is most likely it, but I'm not 100% sure.