RGB to XYZ and LAB colours conversion

前端 未结 3 911
说谎
说谎 2021-02-04 07:59

I\'m having problems converting colours from RGB to LAB space It should be straight forward using the formulas from here, only I\'m getting back the wrong values

  • <
3条回答
  •  没有蜡笔的小新
    2021-02-04 08:51

    function xyzc(c){return ((c/255)>0.04045)?Math.pow((((c/255)+0.055)/1.055),2.4)*100:(c/255)/12.92*100;}

    This line will convert a rgb channel to XYZ

提交回复
热议问题