Skip to content

Commit 9a636d3

Browse files
committed
postcss-color-function-display-p3-linear
1 parent 85963ea commit 9a636d3

142 files changed

Lines changed: 3270 additions & 1332 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/css-issue.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ body:
7272
- PostCSS Browser Comments
7373
- PostCSS Cascade Layers
7474
- PostCSS Color Function
75+
- PostCSS Color Function Display P3 Linear
7576
- PostCSS Color Functional Notation
7677
- PostCSS Color Hex Alpha
7778
- PostCSS Color Mix Function

.github/ISSUE_TEMPLATE/plugin-issue.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ body:
6969
- PostCSS Browser Comments
7070
- PostCSS Cascade Layers
7171
- PostCSS Color Function
72+
- PostCSS Color Function Display P3 Linear
7273
- PostCSS Color Functional Notation
7374
- PostCSS Color Hex Alpha
7475
- PostCSS Color Mix Function

.github/labeler.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@
9595
- plugins/postcss-color-function/**
9696
- experimental/postcss-color-function/**
9797

98+
"plugins/postcss-color-function-display-p3-linear":
99+
- changed-files:
100+
- any-glob-to-any-file:
101+
- plugins/postcss-color-function-display-p3-linear/**
102+
- experimental/postcss-color-function-display-p3-linear/**
103+
98104
"plugins/postcss-color-functional-notation":
99105
- changed-files:
100106
- any-glob-to-any-file:

package-lock.json

Lines changed: 697 additions & 737 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/color-helpers/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changes to Color Helpers
22

3+
### Unreleased (minor)
4+
5+
- Add `lin_P3_to_XYZ_D50`
6+
- Add `XYZ_D50_to_lin_P3`
7+
38
### 5.0.2
49

510
_February 23, 2025_

packages/color-helpers/dist/index.cjs

Lines changed: 27 additions & 27 deletions
Large diffs are not rendered by default.

packages/color-helpers/dist/index.d.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ export declare function lin_P3(RGB: Color): Color;
9494
*/
9595
export declare function lin_P3_to_XYZ(rgb: Color): Color;
9696

97+
/**
98+
* @param {Color} color [r, g, b]
99+
* - Red as number 0..1;
100+
* - Green as number 0..1;
101+
* - Blue as number 0..1;
102+
* @return {Color} D50 XYZ [x, y, z]
103+
*/
104+
export declare function lin_P3_to_XYZ_D50(x: Color): Color;
105+
97106
/**
98107
* Convert an array of of sRGB values where in-gamut values are in the range
99108
* [0 - 1] to linear light (un-companded) form.
@@ -271,6 +280,18 @@ export declare function XYZ_D50_to_Lab(x: Color): Color;
271280
*/
272281
export declare function XYZ_D50_to_LCH(x: Color): Color;
273282

283+
/**
284+
* @param {Color} color [x, y, z]
285+
* - X as number 0..1;
286+
* - Y as number 0..1;
287+
* - Z as number 0..1;
288+
* @return {Color} P3 [r, g, b]
289+
* - R as number 0..1;
290+
* - G as number 0..1;
291+
* - B as number 0..1;
292+
*/
293+
export declare function XYZ_D50_to_lin_P3(x: Color): Color;
294+
274295
/**
275296
* @param {Color} color [x, y, z]
276297
* - X as number 0..1;

packages/color-helpers/dist/index.mjs

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

packages/color-helpers/docs/color-helpers.api.json

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,53 @@
692692
],
693693
"name": "LCH_to_XYZ_D50"
694694
},
695+
{
696+
"kind": "Function",
697+
"canonicalReference": "@csstools/color-helpers!lin_P3_to_XYZ_D50:function(1)",
698+
"docComment": "/**\n * @param 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]\n */\n",
699+
"excerptTokens": [
700+
{
701+
"kind": "Content",
702+
"text": "export declare function lin_P3_to_XYZ_D50(x: "
703+
},
704+
{
705+
"kind": "Reference",
706+
"text": "Color",
707+
"canonicalReference": "@csstools/color-helpers!Color:type"
708+
},
709+
{
710+
"kind": "Content",
711+
"text": "): "
712+
},
713+
{
714+
"kind": "Reference",
715+
"text": "Color",
716+
"canonicalReference": "@csstools/color-helpers!Color:type"
717+
},
718+
{
719+
"kind": "Content",
720+
"text": ";"
721+
}
722+
],
723+
"fileUrlPath": "dist/_types/conversions/xyz/index.d.ts",
724+
"returnTypeTokenRange": {
725+
"startIndex": 3,
726+
"endIndex": 4
727+
},
728+
"releaseTag": "Public",
729+
"overloadIndex": 1,
730+
"parameters": [
731+
{
732+
"parameterName": "x",
733+
"parameterTypeTokenRange": {
734+
"startIndex": 1,
735+
"endIndex": 2
736+
},
737+
"isOptional": false
738+
}
739+
],
740+
"name": "lin_P3_to_XYZ_D50"
741+
},
695742
{
696743
"kind": "Function",
697744
"canonicalReference": "@csstools/color-helpers!lin_P3_to_XYZ:function(1)",
@@ -1836,6 +1883,53 @@
18361883
],
18371884
"name": "XYZ_D50_to_LCH"
18381885
},
1886+
{
1887+
"kind": "Function",
1888+
"canonicalReference": "@csstools/color-helpers!XYZ_D50_to_lin_P3:function(1)",
1889+
"docComment": "/**\n * @param 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;\n */\n",
1890+
"excerptTokens": [
1891+
{
1892+
"kind": "Content",
1893+
"text": "export declare function XYZ_D50_to_lin_P3(x: "
1894+
},
1895+
{
1896+
"kind": "Reference",
1897+
"text": "Color",
1898+
"canonicalReference": "@csstools/color-helpers!Color:type"
1899+
},
1900+
{
1901+
"kind": "Content",
1902+
"text": "): "
1903+
},
1904+
{
1905+
"kind": "Reference",
1906+
"text": "Color",
1907+
"canonicalReference": "@csstools/color-helpers!Color:type"
1908+
},
1909+
{
1910+
"kind": "Content",
1911+
"text": ";"
1912+
}
1913+
],
1914+
"fileUrlPath": "dist/_types/conversions/xyz/index.d.ts",
1915+
"returnTypeTokenRange": {
1916+
"startIndex": 3,
1917+
"endIndex": 4
1918+
},
1919+
"releaseTag": "Public",
1920+
"overloadIndex": 1,
1921+
"parameters": [
1922+
{
1923+
"parameterName": "x",
1924+
"parameterTypeTokenRange": {
1925+
"startIndex": 1,
1926+
"endIndex": 2
1927+
},
1928+
"isOptional": false
1929+
}
1930+
],
1931+
"name": "XYZ_D50_to_lin_P3"
1932+
},
18391933
{
18401934
"kind": "Function",
18411935
"canonicalReference": "@csstools/color-helpers!XYZ_D50_to_lin_sRGB:function(1)",
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@csstools/color-helpers](./color-helpers.md) &gt; [lin\_P3\_to\_XYZ\_D50](./color-helpers.lin_p3_to_xyz_d50.md)
4+
5+
## lin\_P3\_to\_XYZ\_D50() function
6+
7+
**Signature:**
8+
9+
```typescript
10+
export declare function lin_P3_to_XYZ_D50(x: Color): Color;
11+
```
12+
13+
## Parameters
14+
15+
<table><thead><tr><th>
16+
17+
Parameter
18+
19+
20+
</th><th>
21+
22+
Type
23+
24+
25+
</th><th>
26+
27+
Description
28+
29+
30+
</th></tr></thead>
31+
<tbody><tr><td>
32+
33+
x
34+
35+
36+
</td><td>
37+
38+
[Color](./color-helpers.color.md)
39+
40+
41+
</td><td>
42+
43+
44+
</td></tr>
45+
</tbody></table>
46+
47+
**Returns:**
48+
49+
[Color](./color-helpers.color.md)
50+

0 commit comments

Comments
 (0)