????????????
This commit is contained in:
parent
7a1d79fa2f
commit
34aa4f55b6
1 changed files with 3 additions and 3 deletions
|
@ -79,8 +79,7 @@ class RGB {
|
||||||
let lm = val & 15;
|
let lm = val & 15;
|
||||||
let crlv = cr ? 50 : 0;
|
let crlv = cr ? 50 : 0;
|
||||||
|
|
||||||
/*
|
let phase = ((cr - 1) * 25 - 33) * (2 * Math.PI / 360);
|
||||||
let phase = ((cr - 1) * 25 - 58) * (2 * Math.PI / 360);
|
|
||||||
|
|
||||||
let y = 255 * (lm + 1) / 16;
|
let y = 255 * (lm + 1) / 16;
|
||||||
let i = crlv * Math.cos(phase);
|
let i = crlv * Math.cos(phase);
|
||||||
|
@ -89,8 +88,8 @@ class RGB {
|
||||||
let r = y + 0.956 * i + 0.621 * q;
|
let r = y + 0.956 * i + 0.621 * q;
|
||||||
let g = y - 0.272 * i - 0.647 * q;
|
let g = y - 0.272 * i - 0.647 * q;
|
||||||
let b = y - 1.107 * i + 1.704 * q;
|
let b = y - 1.107 * i + 1.704 * q;
|
||||||
*/
|
|
||||||
|
|
||||||
|
/*
|
||||||
// PAL
|
// PAL
|
||||||
let phase = ((cr - 1) * 25.7 - 15) * (2 * Math.PI / 360);
|
let phase = ((cr - 1) * 25.7 - 15) * (2 * Math.PI / 360);
|
||||||
|
|
||||||
|
@ -101,6 +100,7 @@ class RGB {
|
||||||
let r = y + 0.956 * i + 0.621 * q;
|
let r = y + 0.956 * i + 0.621 * q;
|
||||||
let g = y - 0.272 * i - 0.647 * q;
|
let g = y - 0.272 * i - 0.647 * q;
|
||||||
let b = y - 1.107 * i + 1.704 * q;
|
let b = y - 1.107 * i + 1.704 * q;
|
||||||
|
*/
|
||||||
|
|
||||||
return new RGB(r, g, b).clamp().fromSRGB();
|
return new RGB(r, g, b).clamp().fromSRGB();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue