@scratch/scratch-svg-renderer 11.0.0 → 11.1.0-feature-parity.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,417 @@
1
+ /*!
2
+ * decimal.js v10.5.0
3
+ * An arbitrary-precision Decimal type for JavaScript.
4
+ * https://github.com/MikeMcl/decimal.js
5
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
6
+ * MIT Licence
7
+ */
8
+
9
+ /*!
10
+ * CSS color - Resolve, parse, convert CSS color.
11
+ * @license MIT
12
+ * @copyright asamuzaK (Kazz)
13
+ * @see {@link https://github.com/asamuzaK/cssColor/blob/main/LICENSE}
14
+ */
15
+
16
+ /*!
17
+ * Copyright (c) 2015, Salesforce.com, Inc.
18
+ * All rights reserved.
19
+ *
20
+ * Redistribution and use in source and binary forms, with or without
21
+ * modification, are permitted provided that the following conditions are met:
22
+ *
23
+ * 1. Redistributions of source code must retain the above copyright notice,
24
+ * this list of conditions and the following disclaimer.
25
+ *
26
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
27
+ * this list of conditions and the following disclaimer in the documentation
28
+ * and/or other materials provided with the distribution.
29
+ *
30
+ * 3. Neither the name of Salesforce.com nor the names of its contributors may
31
+ * be used to endorse or promote products derived from this software without
32
+ * specific prior written permission.
33
+ *
34
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
35
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
36
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
37
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
38
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
39
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
40
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
41
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
42
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
43
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
44
+ * POSSIBILITY OF SUCH DAMAGE.
45
+ */
46
+
47
+ /*!
48
+ * Copyright (c) 2015-2020, Salesforce.com, Inc.
49
+ * All rights reserved.
50
+ *
51
+ * Redistribution and use in source and binary forms, with or without
52
+ * modification, are permitted provided that the following conditions are met:
53
+ *
54
+ * 1. Redistributions of source code must retain the above copyright notice,
55
+ * this list of conditions and the following disclaimer.
56
+ *
57
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
58
+ * this list of conditions and the following disclaimer in the documentation
59
+ * and/or other materials provided with the distribution.
60
+ *
61
+ * 3. Neither the name of Salesforce.com nor the names of its contributors may
62
+ * be used to endorse or promote products derived from this software without
63
+ * specific prior written permission.
64
+ *
65
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
66
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
67
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
68
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
69
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
70
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
71
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
72
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
73
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
74
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
75
+ * POSSIBILITY OF SUCH DAMAGE.
76
+ */
77
+
78
+ /*!
79
+ * Copyright (c) 2018, Salesforce.com, Inc.
80
+ * All rights reserved.
81
+ *
82
+ * Redistribution and use in source and binary forms, with or without
83
+ * modification, are permitted provided that the following conditions are met:
84
+ *
85
+ * 1. Redistributions of source code must retain the above copyright notice,
86
+ * this list of conditions and the following disclaimer.
87
+ *
88
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
89
+ * this list of conditions and the following disclaimer in the documentation
90
+ * and/or other materials provided with the distribution.
91
+ *
92
+ * 3. Neither the name of Salesforce.com nor the names of its contributors may
93
+ * be used to endorse or promote products derived from this software without
94
+ * specific prior written permission.
95
+ *
96
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
97
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
98
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
99
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
100
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
101
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
102
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
103
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
104
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
105
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
106
+ * POSSIBILITY OF SUCH DAMAGE.
107
+ */
108
+
109
+ /*!
110
+ * mime-db
111
+ * Copyright(c) 2014 Jonathan Ong
112
+ * Copyright(c) 2015-2022 Douglas Christopher Wilson
113
+ * MIT Licensed
114
+ */
115
+
116
+ /*!
117
+ * mime-types
118
+ * Copyright(c) 2014 Jonathan Ong
119
+ * Copyright(c) 2015 Douglas Christopher Wilson
120
+ * MIT Licensed
121
+ */
122
+
123
+ /*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
124
+
125
+ /**
126
+ * @description Calculate deltaE OK which is the simple root sum of squares
127
+ * @param {number[]} reference - Array of OKLab values: L as 0..1, a and b as -1..1
128
+ * @param {number[]} sample - Array of OKLab values: L as 0..1, a and b as -1..1
129
+ * @return {number} How different a color sample is from reference
130
+ *
131
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
132
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/deltaEOK.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
133
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/deltaEOK.js
134
+ */
135
+
136
+ /**
137
+ * @license MIT https://github.com/facelessuser/coloraide/blob/main/LICENSE.md
138
+ */
139
+
140
+ /**
141
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
142
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
143
+ *
144
+ * XYZ <-> LMS matrices recalculated for consistent reference white
145
+ * @see https://github.com/w3c/csswg-drafts/issues/6642#issuecomment-943521484
146
+ */
147
+
148
+ /**
149
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
150
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
151
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js
152
+ */
153
+
154
+ /**
155
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
156
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
157
+ */
158
+
159
+ /**
160
+ * @param {number} hue - Hue as degrees 0..360
161
+ * @param {number} white - Whiteness as percentage 0..100
162
+ * @param {number} black - Blackness as percentage 0..100
163
+ * @return {number[]} Array of RGB components 0..1
164
+ *
165
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
166
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/hwbToRgb.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
167
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/hwbToRgb.js
168
+ */
169
+
170
+ /**
171
+ * @param {number} hue - Hue as degrees 0..360
172
+ * @param {number} sat - Saturation as percentage 0..100
173
+ * @param {number} light - Lightness as percentage 0..100
174
+ * @return {number[]} Array of sRGB components; in-gamut colors in range [0..1]
175
+ *
176
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
177
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/hslToRgb.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
178
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/hslToRgb.js
179
+ */
180
+
181
+ /**
182
+ * Assuming XYZ is relative to D50, convert to CIE Lab
183
+ * from CIE standard, which now defines these as a rational fraction
184
+ *
185
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
186
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
187
+ */
188
+
189
+ /**
190
+ * Bradford chromatic adaptation from D50 to D65
191
+ *
192
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
193
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
194
+ */
195
+
196
+ /**
197
+ * Bradford chromatic adaptation from D65 to D50
198
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
199
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
200
+ * @see http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html
201
+ */
202
+
203
+ /**
204
+ * Character class utilities for XML NS 1.0 edition 3.
205
+ *
206
+ * @author Louis-Dominique Dubeau
207
+ * @license MIT
208
+ * @copyright Louis-Dominique Dubeau
209
+ */
210
+
211
+ /**
212
+ * Character classes and associated utilities for the 2nd edition of XML 1.1.
213
+ *
214
+ * @author Louis-Dominique Dubeau
215
+ * @license MIT
216
+ * @copyright Louis-Dominique Dubeau
217
+ */
218
+
219
+ /**
220
+ * Character classes and associated utilities for the 5th edition of XML 1.0.
221
+ *
222
+ * @author Louis-Dominique Dubeau
223
+ * @license MIT
224
+ * @copyright Louis-Dominique Dubeau
225
+ */
226
+
227
+ /**
228
+ * Convert D50 XYZ to linear-light prophoto-rgb
229
+ *
230
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
231
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
232
+ * @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
233
+ */
234
+
235
+ /**
236
+ * Convert Lab to D50-adapted XYZ
237
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
238
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
239
+ * @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
240
+ */
241
+
242
+ /**
243
+ * Convert XYZ to linear-light P3
244
+ *
245
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
246
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
247
+ */
248
+
249
+ /**
250
+ * Convert XYZ to linear-light rec2020
251
+ *
252
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
253
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
254
+ */
255
+
256
+ /**
257
+ * Convert an array of a98-rgb values in the range 0.0 - 1.0
258
+ * to linear light (un-companded) form. Negative values are also now accepted
259
+ *
260
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
261
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
262
+ */
263
+
264
+ /**
265
+ * Convert an array of display-p3 RGB values in the range 0.0 - 1.0
266
+ * to linear light (un-companded) form.
267
+ *
268
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
269
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
270
+ */
271
+
272
+ /**
273
+ * Convert an array of gamma-corrected sRGB values in the 0.0 to 1.0 range to HSL.
274
+ *
275
+ * @param {Color} RGB [r, g, b]
276
+ * - Red component 0..1
277
+ * - Green component 0..1
278
+ * - Blue component 0..1
279
+ * @return {number[]} Array of HSL values: Hue as degrees 0..360, Saturation and Lightness as percentages 0..100
280
+ *
281
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
282
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/utilities.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
283
+ *
284
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/better-rgbToHsl.js
285
+ */
286
+
287
+ /**
288
+ * Convert an array of linear-light a98-rgb in the range 0.0-1.0
289
+ * to gamma corrected form. Negative values are also now accepted
290
+ *
291
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
292
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
293
+ */
294
+
295
+ /**
296
+ * Convert an array of linear-light a98-rgb values to CIE XYZ
297
+ * http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
298
+ * has greater numerical precision than section 4.3.5.3 of
299
+ * https://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf
300
+ * but the values below were calculated from first principles
301
+ * from the chromaticity coordinates of R G B W
302
+ *
303
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
304
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
305
+ * @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
306
+ * @see https://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf
307
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/matrixmaker.html
308
+ */
309
+
310
+ /**
311
+ * Convert an array of linear-light display-p3 RGB in the range 0.0-1.0
312
+ * to gamma corrected form
313
+ *
314
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
315
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
316
+ */
317
+
318
+ /**
319
+ * Convert an array of linear-light display-p3 values to CIE XYZ
320
+ * using D65 (no chromatic adaptation)
321
+ *
322
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
323
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
324
+ * @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
325
+ */
326
+
327
+ /**
328
+ * Convert an array of linear-light prophoto-rgb in the range 0.0-1.0
329
+ * to gamma corrected form.
330
+ * Transfer curve is gamma 1.8 with a small linear portion.
331
+ *
332
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
333
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
334
+ */
335
+
336
+ /**
337
+ * Convert an array of linear-light prophoto-rgb values to CIE D50 XYZ.
338
+ * Matrix cannot be expressed in rational form, but is calculated to 64 bit accuracy.
339
+ *
340
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
341
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
342
+ * @see see https://github.com/w3c/csswg-drafts/issues/7675
343
+ */
344
+
345
+ /**
346
+ * Convert an array of linear-light rec2020 RGB in the range 0.0-1.0
347
+ * to gamma corrected form ITU-R BT.2020-2 p.4
348
+ *
349
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
350
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
351
+ */
352
+
353
+ /**
354
+ * Convert an array of linear-light rec2020 values to CIE XYZ
355
+ * using D65 (no chromatic adaptation)
356
+ *
357
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
358
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
359
+ * @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
360
+ */
361
+
362
+ /**
363
+ * Convert an array of linear-light sRGB values in the range 0.0-1.0 to gamma corrected form
364
+ * Extended transfer function:
365
+ * For negative values, linear portion extends on reflection
366
+ * of axis, then uses reflected pow below that
367
+ *
368
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
369
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
370
+ * @see https://en.wikipedia.org/wiki/SRGB
371
+ */
372
+
373
+ /**
374
+ * Convert an array of linear-light sRGB values to CIE XYZ
375
+ * using sRGB's own white, D65 (no chromatic adaptation)
376
+ *
377
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
378
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
379
+ */
380
+
381
+ /**
382
+ * Convert an array of of sRGB values where in-gamut values are in the range
383
+ * [0 - 1] to linear light (un-companded) form.
384
+ * Extended transfer function:
385
+ * For negative values, linear portion is extended on reflection of axis,
386
+ * then reflected power function is used.
387
+ *
388
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
389
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
390
+ * @see https://en.wikipedia.org/wiki/SRGB
391
+ */
392
+
393
+ /**
394
+ * Convert an array of prophoto-rgb values where in-gamut Colors are in the
395
+ * range [0.0 - 1.0] to linear light (un-companded) form. Transfer curve is
396
+ * gamma 1.8 with a small linear portion. Extended transfer function
397
+ *
398
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
399
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
400
+ */
401
+
402
+ /**
403
+ * Convert an array of rec2020 RGB values in the range 0.0 - 1.0
404
+ * to linear light (un-companded) form.
405
+ * ITU-R BT.2020-2 p.4
406
+ *
407
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
408
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
409
+ */
410
+
411
+ /**
412
+ * Given OKLab, convert to XYZ relative to D65
413
+ *
414
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
415
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
416
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js
417
+ */