1const convertOklabToLrgb = ({ l, a, b, alpha }) => { 2 if (l === undefined) l = 0; 3 if (a === undefined) a = 0; 4 if (b === undefined) b = 0; 5 let L = Math.pow( 6 l * 0.99999999845051981432 + 7 0.39633779217376785678 * a + 8 0.21580375806075880339 * b, 9 3 10 ); 11 let M = Math.pow( 12 l * 1.0000000088817607767 - 13 0.1055613423236563494 * a - 14 0.063854174771705903402 * b, 15 3 16 ); 17 let S = Math.pow( 18 l * 1.0000000546724109177 - 19 0.089484182094965759684 * a - 20 1.2914855378640917399 * b, 21 3 22 ); 23 24 let res = { 25 mode: 'lrgb', 26 r: 27 +4.076741661347994 * L - 28 3.307711590408193 * M + 29 0.230969928729428 * S, 30 g: 31 -1.2684380040921763 * L + 32 2.6097574006633715 * M - 33 0.3413193963102197 * S, 34 b: 35 -0.004196086541837188 * L - 36 0.7034186144594493 * M + 37 1.7076147009309444 * S 38 }; 39 40 if (alpha !== undefined) { 41 res.alpha = alpha; 42 } 43 44 return res; 45}; 46 47export default convertOklabToLrgb;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.