Initial upload
This commit is contained in:
9
node_modules/@csstools/color-helpers/CHANGELOG.md
generated
vendored
Normal file
9
node_modules/@csstools/color-helpers/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# Changes to Color Helpers
|
||||
|
||||
### 6.1.1
|
||||
|
||||
_August 15, 2026_
|
||||
|
||||
- Updated: gamut mapping algorithm
|
||||
|
||||
[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/packages/color-helpers/CHANGELOG.md)
|
||||
18
node_modules/@csstools/color-helpers/LICENSE.md
generated
vendored
Normal file
18
node_modules/@csstools/color-helpers/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
MIT No Attribution (MIT-0)
|
||||
|
||||
Copyright © CSSTools Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the “Software”), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
32
node_modules/@csstools/color-helpers/README.md
generated
vendored
Normal file
32
node_modules/@csstools/color-helpers/README.md
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# Color Helpers <img src="https://cssdb.org/images/css.svg" alt="for CSS" width="90" height="90" align="right">
|
||||
|
||||
[<img alt="npm version" src="https://img.shields.io/npm/v/@csstools/color-helpers.svg" height="20">][npm-url]
|
||||
[<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/actions/workflows/test.yml/badge.svg?branch=main" height="20">][cli-url]
|
||||
[<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord]
|
||||
|
||||
## Usage
|
||||
|
||||
Add [Color Helpers] to your project:
|
||||
|
||||
```bash
|
||||
npm install @csstools/color-helpers --save-dev
|
||||
```
|
||||
|
||||
This package exists to join all the different color functions scattered among the Colors 4 and Colors 5 plugins we maintain such as:
|
||||
|
||||
* [PostCSS Color Function]
|
||||
* [PostCSS Lab Function]
|
||||
* [PostCSS OKLab Function]
|
||||
|
||||
## Copyright
|
||||
|
||||
This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/tree/main/css-color-4. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
|
||||
|
||||
[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
|
||||
[discord]: https://discord.gg/bUadyRwkJS
|
||||
[npm-url]: https://www.npmjs.com/package/@csstools/color-helpers
|
||||
|
||||
[Color Helpers]: https://github.com/csstools/postcss-plugins/tree/main/packages/color-helpers
|
||||
[PostCSS Color Function]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-function
|
||||
[PostCSS Lab Function]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-lab-functionw
|
||||
[PostCSS OKLab Function]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-oklab-function
|
||||
711
node_modules/@csstools/color-helpers/dist/index.d.ts
generated
vendored
Normal file
711
node_modules/@csstools/color-helpers/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,711 @@
|
||||
/**
|
||||
* @param {Color} color [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function a98_RGB_to_XYZ_D50(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function a98_RGB_to_XYZ_D65(x: Color): Color;
|
||||
|
||||
export declare function clip(color: Color): Color;
|
||||
|
||||
export declare type Color = [number, number, number];
|
||||
|
||||
/**
|
||||
* WCAG 2.1 contrast ratio
|
||||
*/
|
||||
export declare function contrast_ratio_wcag_2_1(color1: Color, color2: Color): number;
|
||||
|
||||
/**
|
||||
* Convert an array of linear-light display-p3 RGB in the range 0.0-1.0
|
||||
* to gamma corrected form
|
||||
*
|
||||
* @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
||||
* @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).
|
||||
*/
|
||||
export declare function gam_P3(RGB: Color): Color;
|
||||
|
||||
/**
|
||||
* Convert an array of linear-light sRGB values in the range 0.0-1.0 to gamma corrected form
|
||||
* Extended transfer function:
|
||||
* For negative values, linear portion extends on reflection
|
||||
* of axis, then uses reflected pow below that
|
||||
*
|
||||
* @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
||||
* @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).
|
||||
* @see https://en.wikipedia.org/wiki/SRGB
|
||||
*/
|
||||
export declare function gam_sRGB(RGB: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [h, s, l]
|
||||
* - Hue as degrees 0..360;
|
||||
* - Saturation as number 0..100;
|
||||
* - Lightness as number 0..100;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function HSL_to_XYZ_D50(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [h, s, l]
|
||||
* - Hue as degrees 0..360;
|
||||
* - Saturation as number 0..100;
|
||||
* - Lightness as number 0..100;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function HSL_to_XYZ_D65(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [h, w, b]
|
||||
* - Hue as degrees 0..360;
|
||||
* - Whiteness as number 0..100;
|
||||
* - Blackness as number 0..100;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function HWB_to_XYZ_D50(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [h, w, b]
|
||||
* - Hue as degrees 0..360;
|
||||
* - Whiteness as number 0..100;
|
||||
* - Blackness as number 0..100;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function HWB_to_XYZ_D65(x: Color): Color;
|
||||
|
||||
export declare function inGamut(x: Color): boolean;
|
||||
|
||||
/**
|
||||
* @param {Color} color [l, a, b]
|
||||
* - Lightness as number 0..100;
|
||||
* - a as number -160..160;
|
||||
* - b as number -160..160;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function Lab_to_XYZ_D50(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [l, a, b]
|
||||
* - Lightness as number 0..100;
|
||||
* - a as number -160..160;
|
||||
* - b as number -160..160;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function Lab_to_XYZ_D65(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [l, c, h]
|
||||
* - Lightness as number 0..100;
|
||||
* - Chroma as number 0..230;
|
||||
* - Hue as degrees 0..360;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function LCH_to_XYZ_D50(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [l, c, h]
|
||||
* - Lightness as number 0..100;
|
||||
* - Chroma as number 0..230;
|
||||
* - Hue as degrees 0..360;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function LCH_to_XYZ_D65(x: Color): Color;
|
||||
|
||||
/**
|
||||
* Convert an array of display-p3 RGB values in the range 0.0 - 1.0
|
||||
* to linear light (un-companded) form.
|
||||
*
|
||||
* @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
||||
* @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).
|
||||
*/
|
||||
export declare function lin_P3(RGB: Color): Color;
|
||||
|
||||
/**
|
||||
* Convert an array of linear-light display-p3 values to CIE XYZ
|
||||
* using D65 (no chromatic adaptation)
|
||||
*
|
||||
* @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
||||
* @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).
|
||||
* @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
|
||||
*/
|
||||
export declare function lin_P3_to_XYZ(rgb: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function lin_P3_to_XYZ_D50(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function lin_P3_to_XYZ_D65(x: Color): Color;
|
||||
|
||||
/**
|
||||
* Convert an array of of sRGB values where in-gamut values are in the range
|
||||
* [0 - 1] to linear light (un-companded) form.
|
||||
* Extended transfer function:
|
||||
* For negative values, linear portion is extended on reflection of axis,
|
||||
* then reflected power function is used.
|
||||
*
|
||||
* @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
||||
* @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).
|
||||
* @see https://en.wikipedia.org/wiki/SRGB
|
||||
*/
|
||||
export declare function lin_sRGB(RGB: Color): Color;
|
||||
|
||||
/**
|
||||
* Convert an array of linear-light sRGB values to CIE XYZ
|
||||
* using sRGB's own white, D65 (no chromatic adaptation)
|
||||
*
|
||||
* @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
||||
* @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).
|
||||
*/
|
||||
export declare function lin_sRGB_to_XYZ(rgb: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function lin_sRGB_to_XYZ_D50(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function lin_sRGB_to_XYZ_D65(x: Color): Color;
|
||||
|
||||
export declare function mapGamut(startOKLCH: Color, toDestination: (x: Color) => Color, fromDestination: (x: Color) => Color): Color;
|
||||
|
||||
/**
|
||||
* @license MIT https://github.com/facelessuser/coloraide/blob/main/LICENSE.md
|
||||
*/
|
||||
export declare function mapGamutRayTrace(startOKLCH: Color, toLinear: (x: Color) => Color, fromLinear: (x: Color) => Color): Color;
|
||||
|
||||
export declare const namedColors: Record<string, Color>;
|
||||
|
||||
/**
|
||||
* @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
||||
* @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).
|
||||
* @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js
|
||||
*/
|
||||
export declare function OKLab_to_OKLCH(OKLab: Color): Color;
|
||||
|
||||
/**
|
||||
* Given OKLab, convert to XYZ relative to D65
|
||||
*
|
||||
* @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
||||
* @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).
|
||||
* @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js
|
||||
*/
|
||||
export declare function OKLab_to_XYZ(OKLab: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [l, a, b]
|
||||
* - Lightness as number 0..1;
|
||||
* - a as number 0..0.5;
|
||||
* - b as number 0..0.5;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function OKLab_to_XYZ_D50(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [l, a, b]
|
||||
* - Lightness as number 0..1;
|
||||
* - a as number 0..0.5;
|
||||
* - b as number 0..0.5;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function OKLab_to_XYZ_D65(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
||||
* @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).
|
||||
* @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js
|
||||
*/
|
||||
export declare function OKLCH_to_OKLab(OKLCH: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [l, c, h]
|
||||
* - Lightness as number 0..1;
|
||||
* - Chroma as number 0..0.5;
|
||||
* - Hue as degrees 0..360;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function OKLCH_to_XYZ_D50(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [l, c, h]
|
||||
* - Lightness as number 0..1;
|
||||
* - Chroma as number 0..0.5;
|
||||
* - Hue as degrees 0..360;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function OKLCH_to_XYZ_D65(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function P3_to_XYZ_D50(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function P3_to_XYZ_D65(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function ProPhoto_RGB_to_XYZ_D50(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function ProPhoto_RGB_to_XYZ_D65(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function rec_2020_to_XYZ_D50(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function rec_2020_to_XYZ_D65(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function sRGB_to_XYZ_D50(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function sRGB_to_XYZ_D65(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} a98 sRGB [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
*/
|
||||
export declare function XYZ_D50_to_a98_RGB(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} HSL [r, g, b]
|
||||
* - Hue as degrees 0..360;
|
||||
* - Saturation as number 0..100;
|
||||
* - Lightness as number 0..100;
|
||||
*/
|
||||
export declare function XYZ_D50_to_HSL(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} HWB [r, g, b]
|
||||
* - Hue as degrees 0..360;
|
||||
* - Whiteness as number 0..100;
|
||||
* - Blackness as number 0..100;
|
||||
*/
|
||||
export declare function XYZ_D50_to_HWB(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} Lab [r, g, b]
|
||||
* - Lightness as number 0..100;
|
||||
* - a as number -160..160;
|
||||
* - b as number -160..160;
|
||||
*/
|
||||
export declare function XYZ_D50_to_Lab(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} LCH [r, g, b]
|
||||
* - Lightness as number 0..100;
|
||||
* - Chroma as number 0..230;
|
||||
* - Hue as degrees 0..360;
|
||||
*/
|
||||
export declare function XYZ_D50_to_LCH(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} P3 [r, g, b]
|
||||
* - R as number 0..1;
|
||||
* - G as number 0..1;
|
||||
* - B as number 0..1;
|
||||
*/
|
||||
export declare function XYZ_D50_to_lin_P3(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} linear sRGB [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
*/
|
||||
export declare function XYZ_D50_to_lin_sRGB(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} OKLab [r, g, b]
|
||||
* - Lightness as number 0..1;
|
||||
* - a as number 0..0.5;
|
||||
* - b as number 0..0.5;
|
||||
*/
|
||||
export declare function XYZ_D50_to_OKLab(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} OKLCH [r, g, b]
|
||||
* - Lightness as number 0..1;
|
||||
* - Chroma as number 0..0.5;
|
||||
* - Hue as degrees 0..360;
|
||||
*/
|
||||
export declare function XYZ_D50_to_OKLCH(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} P3 [r, g, b]
|
||||
* - R as number 0..1;
|
||||
* - G as number 0..1;
|
||||
* - B as number 0..1;
|
||||
*/
|
||||
export declare function XYZ_D50_to_P3(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} ProPhoto [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
*/
|
||||
export declare function XYZ_D50_to_ProPhoto(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} rec 2020 [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
*/
|
||||
export declare function XYZ_D50_to_rec_2020(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} sRGB [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
*/
|
||||
export declare function XYZ_D50_to_sRGB(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function XYZ_D50_to_XYZ_D50(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} D65 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function XYZ_D50_to_XYZ_D65(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} a98 sRGB [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
*/
|
||||
export declare function XYZ_D65_to_a98_RGB(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} HSL [r, g, b]
|
||||
* - Hue as degrees 0..360;
|
||||
* - Saturation as number 0..100;
|
||||
* - Lightness as number 0..100;
|
||||
*/
|
||||
export declare function XYZ_D65_to_HSL(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} HWB [r, g, b]
|
||||
* - Hue as degrees 0..360;
|
||||
* - Whiteness as number 0..100;
|
||||
* - Blackness as number 0..100;
|
||||
*/
|
||||
export declare function XYZ_D65_to_HWB(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} Lab [r, g, b]
|
||||
* - Lightness as number 0..100;
|
||||
* - a as number -160..160;
|
||||
* - b as number -160..160;
|
||||
*/
|
||||
export declare function XYZ_D65_to_Lab(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} LCH [r, g, b]
|
||||
* - Lightness as number 0..100;
|
||||
* - Chroma as number 0..230;
|
||||
* - Hue as degrees 0..360;
|
||||
*/
|
||||
export declare function XYZ_D65_to_LCH(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} P3 [r, g, b]
|
||||
* - R as number 0..1;
|
||||
* - G as number 0..1;
|
||||
* - B as number 0..1;
|
||||
*/
|
||||
export declare function XYZ_D65_to_lin_P3(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} linear sRGB [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
*/
|
||||
export declare function XYZ_D65_to_lin_sRGB(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} OKLab [r, g, b]
|
||||
* - Lightness as number 0..1;
|
||||
* - a as number 0..0.5;
|
||||
* - b as number 0..0.5;
|
||||
*/
|
||||
export declare function XYZ_D65_to_OKLab(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} OKLCH [r, g, b]
|
||||
* - Lightness as number 0..1;
|
||||
* - Chroma as number 0..0.5;
|
||||
* - Hue as degrees 0..360;
|
||||
*/
|
||||
export declare function XYZ_D65_to_OKLCH(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} P3 [r, g, b]
|
||||
* - R as number 0..1;
|
||||
* - G as number 0..1;
|
||||
* - B as number 0..1;
|
||||
*/
|
||||
export declare function XYZ_D65_to_P3(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} ProPhoto [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
*/
|
||||
export declare function XYZ_D65_to_ProPhoto(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} rec 2020 [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
*/
|
||||
export declare function XYZ_D65_to_rec_2020(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} sRGB [r, g, b]
|
||||
* - Red as number 0..1;
|
||||
* - Green as number 0..1;
|
||||
* - Blue as number 0..1;
|
||||
*/
|
||||
export declare function XYZ_D65_to_sRGB(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function XYZ_D65_to_XYZ_D50(x: Color): Color;
|
||||
|
||||
/**
|
||||
* @param {Color} color [x, y, z]
|
||||
* - X as number 0..1;
|
||||
* - Y as number 0..1;
|
||||
* - Z as number 0..1;
|
||||
* @return {Color} D50 XYZ [x, y, z]
|
||||
*/
|
||||
export declare function XYZ_D65_to_XYZ_D65(x: Color): Color;
|
||||
|
||||
/**
|
||||
* Convert XYZ to linear-light P3
|
||||
*
|
||||
* @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
||||
* @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).
|
||||
*/
|
||||
export declare function XYZ_to_lin_P3(XYZ: Color): Color;
|
||||
|
||||
/**
|
||||
* @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
||||
* @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).
|
||||
*/
|
||||
export declare function XYZ_to_lin_sRGB(XYZ: Color): Color;
|
||||
|
||||
/**
|
||||
* @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
||||
* @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).
|
||||
*
|
||||
* XYZ <-> LMS matrices recalculated for consistent reference white
|
||||
* @see https://github.com/w3c/csswg-drafts/issues/6642#issuecomment-943521484
|
||||
*/
|
||||
export declare function XYZ_to_OKLab(XYZ: Color): Color;
|
||||
|
||||
export { }
|
||||
261
node_modules/@csstools/color-helpers/dist/index.mjs
generated
vendored
Normal file
261
node_modules/@csstools/color-helpers/dist/index.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
55
node_modules/@csstools/color-helpers/package.json
generated
vendored
Normal file
55
node_modules/@csstools/color-helpers/package.json
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"name": "@csstools/color-helpers",
|
||||
"description": "Color helpers to ease transformation between formats, gamut, etc",
|
||||
"version": "6.1.1",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Antonio Laguna",
|
||||
"email": "antonio@laguna.es",
|
||||
"url": "https://antonio.laguna.es"
|
||||
},
|
||||
{
|
||||
"name": "Romain Menke",
|
||||
"email": "romainmenke@gmail.com"
|
||||
}
|
||||
],
|
||||
"license": "MIT-0",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/csstools"
|
||||
},
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/csstools"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.mjs"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"CHANGELOG.md",
|
||||
"LICENSE.md",
|
||||
"README.md",
|
||||
"dist"
|
||||
],
|
||||
"scripts": {},
|
||||
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/packages/color-helpers#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/csstools/postcss-plugins.git",
|
||||
"directory": "packages/color-helpers"
|
||||
},
|
||||
"bugs": "https://github.com/csstools/postcss-plugins/issues",
|
||||
"keywords": [
|
||||
"colors",
|
||||
"css"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user