Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update chromatic adaptation matrices to higher precision #1179

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/color-helpers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes to Color Helpers

### Unreleased (patch)

- Use higher precision color conversion matrices.

### 3.0.2

_September 2, 2023_
Expand Down
8 changes: 4 additions & 4 deletions packages/color-helpers/dist/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ function lin_sRGB(t){return t.map((function(t){const _=t<0?-1:1,o=Math.abs(t);re
*
* @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).
*/
function D50_to_D65(t){return multiplyMatrices([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],t)}
function D50_to_D65(t){return multiplyMatrices([[.955473421488075,-.02309845494876471,.06325924320057072],[-.0283697093338637,1.0099953980813041,.021041441191917323],[.012314014864481998,-.020507649298898964,1.330365926242124]],t)}
/**
* Bradford chromatic adaptation from D65 to D50
* @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_ChromAdapt.html
*/function D65_to_D50(t){return multiplyMatrices([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],t)}
*/function D65_to_D50(t){return multiplyMatrices([[1.0479297925449969,.022946870601609652,-.05019226628920524],[.02962780877005599,.9904344267538799,-.017073799063418826],[-.009243040646204504,.015055191490298152,.7518742814281371]],t)}
/**
* Convert an array of linear-light rec2020 RGB in the range 0.0-1.0
* to gamma corrected form ITU-R BT.2020-2 p.4
Expand Down Expand Up @@ -301,7 +301,7 @@ function OKLab_to_OKLCH(t){const _=180*Math.atan2(t[2],t[1])/Math.PI;return[t[0]
* @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
*/function OKLab_to_XYZ(t){const _=multiplyMatrices([[.9999999984505198,.39633779217376786,.2158037580607588],[1.0000000088817609,-.10556134232365635,-.06385417477170591],[1.0000000546724108,-.08948418209496575,-1.2914855378640917]],t);return multiplyMatrices([[1.2268798733741557,-.5578149965554813,.28139105017721583],[-.04057576262431372,1.1122868293970594,-.07171106666151701],[-.07637294974672142,-.4214933239627914,1.5869240244272418]],_.map((t=>t**3)))}
*/function OKLab_to_XYZ(t){const _=multiplyMatrices([[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],t);return multiplyMatrices([[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],_.map((t=>t**3)))}
/**
* Convert an array of gamma-corrected sRGB values in the 0.0 to 1.0 range to HSL.
*
Expand Down Expand Up @@ -367,7 +367,7 @@ function XYZ_to_Lab(t){const _=t.map(((t,_)=>t/r[_])).map((t=>t>.008856451679035
*
* XYZ <-> LMS matrices recalculated for consistent reference white
* @see https://github.com/w3c/csswg-drafts/issues/6642#issuecomment-943521484
*/function XYZ_to_OKLab(t){const _=multiplyMatrices([[.8190224432164319,.3619062562801221,-.12887378261216414],[.0329836671980271,.9292868468965546,.03614466816999844],[.048177199566046255,.26423952494422764,.6335478258136937]],t);return multiplyMatrices([[.2104542553,.793617785,-.0040720468],[1.9779984951,-2.428592205,.4505937099],[.0259040371,.7827717662,-.808675766]],_.map((t=>Math.cbrt(t))))}
*/function XYZ_to_OKLab(t){const _=multiplyMatrices([[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],t);return multiplyMatrices([[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],_.map((t=>Math.cbrt(t))))}
/**
* Convert an array of three XYZ values to u*,v* chromaticity coordinates
*
Expand Down
8 changes: 4 additions & 4 deletions packages/color-helpers/dist/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ function lin_sRGB(t){return t.map((function(t){const _=t<0?-1:1,o=Math.abs(t);re
*
* @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).
*/
function D50_to_D65(t){return multiplyMatrices([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],t)}
function D50_to_D65(t){return multiplyMatrices([[.955473421488075,-.02309845494876471,.06325924320057072],[-.0283697093338637,1.0099953980813041,.021041441191917323],[.012314014864481998,-.020507649298898964,1.330365926242124]],t)}
/**
* Bradford chromatic adaptation from D65 to D50
* @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_ChromAdapt.html
*/function D65_to_D50(t){return multiplyMatrices([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],t)}
*/function D65_to_D50(t){return multiplyMatrices([[1.0479297925449969,.022946870601609652,-.05019226628920524],[.02962780877005599,.9904344267538799,-.017073799063418826],[-.009243040646204504,.015055191490298152,.7518742814281371]],t)}
/**
* Convert an array of linear-light rec2020 RGB in the range 0.0-1.0
* to gamma corrected form ITU-R BT.2020-2 p.4
Expand Down Expand Up @@ -301,7 +301,7 @@ function OKLab_to_OKLCH(t){const _=180*Math.atan2(t[2],t[1])/Math.PI;return[t[0]
* @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
*/function OKLab_to_XYZ(t){const _=multiplyMatrices([[.9999999984505198,.39633779217376786,.2158037580607588],[1.0000000088817609,-.10556134232365635,-.06385417477170591],[1.0000000546724108,-.08948418209496575,-1.2914855378640917]],t);return multiplyMatrices([[1.2268798733741557,-.5578149965554813,.28139105017721583],[-.04057576262431372,1.1122868293970594,-.07171106666151701],[-.07637294974672142,-.4214933239627914,1.5869240244272418]],_.map((t=>t**3)))}
*/function OKLab_to_XYZ(t){const _=multiplyMatrices([[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],t);return multiplyMatrices([[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],_.map((t=>t**3)))}
/**
* Convert an array of gamma-corrected sRGB values in the 0.0 to 1.0 range to HSL.
*
Expand Down Expand Up @@ -367,7 +367,7 @@ function XYZ_to_Lab(t){const _=t.map(((t,_)=>t/r[_])).map((t=>t>.008856451679035
*
* XYZ <-> LMS matrices recalculated for consistent reference white
* @see https://github.com/w3c/csswg-drafts/issues/6642#issuecomment-943521484
*/function XYZ_to_OKLab(t){const _=multiplyMatrices([[.8190224432164319,.3619062562801221,-.12887378261216414],[.0329836671980271,.9292868468965546,.03614466816999844],[.048177199566046255,.26423952494422764,.6335478258136937]],t);return multiplyMatrices([[.2104542553,.793617785,-.0040720468],[1.9779984951,-2.428592205,.4505937099],[.0259040371,.7827717662,-.808675766]],_.map((t=>Math.cbrt(t))))}
*/function XYZ_to_OKLab(t){const _=multiplyMatrices([[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],t);return multiplyMatrices([[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],_.map((t=>Math.cbrt(t))))}
/**
* Convert an array of three XYZ values to u*,v* chromaticity coordinates
*
Expand Down
2 changes: 1 addition & 1 deletion packages/color-helpers/scripts/hashes.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
"384d52db3fcd98381e18743e1eba590a",
"f736dea5b83ebcd853449a02255f747e",
"b6577238c494767f36e2904d3edea5cb",
"094c9859b0960c4e394947cc4832b54f",
"c9e2f2a3b2cba543a01cb8aa5d77c04a",
"840ef26f992267c924230a26f939eaad",
Expand Down
6 changes: 3 additions & 3 deletions packages/color-helpers/src/conversions/d50-to-d65.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { multiplyMatrices } from 'calculations/multiply-matrices';
*/
export function D50_to_D65(XYZ: Color): Color {
const M = [
[0.9554734527042182, -0.023098536874261423, 0.0632593086610217],
[-0.028369706963208136, 1.0099954580058226, 0.021041398966943008],
[0.012314001688319899, -0.020507696433477912, 1.3303659366080753],
[0.955473421488075, -0.02309845494876471, 0.06325924320057072],
[-0.0283697093338637, 1.0099953980813041, 0.021041441191917323],
[0.012314014864481998, -0.020507649298898964, 1.330365926242124],
];

return multiplyMatrices(M, XYZ) as Color;
Expand Down
6 changes: 3 additions & 3 deletions packages/color-helpers/src/conversions/d65-to-d50.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export function D65_to_D50(XYZ: Color): Color {
// - scale components from one reference white to another
// - convert back to XYZ
const M = [
[1.0479298208405488, 0.022946793341019088, -0.05019222954313557],
[0.029627815688159344, 0.990434484573249, -0.01707382502938514],
[-0.009243058152591178, 0.015055144896577895, 0.7518742899580008],
[1.0479297925449969, 0.022946870601609652, -0.05019226628920524],
[0.02962780877005599, 0.9904344267538799, -0.017073799063418826],
[-0.009243040646204504, 0.015055191490298152, 0.7518742814281371],
];

return multiplyMatrices(M, XYZ) as Color;
Expand Down
12 changes: 6 additions & 6 deletions packages/color-helpers/src/conversions/oklab-to-xyz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ import { multiplyMatrices } from 'calculations/multiply-matrices';

export function OKLab_to_XYZ(OKLab: Color): Color {
const LMStoXYZ = [
[1.2268798733741557, -0.5578149965554813, 0.28139105017721583],
[-0.04057576262431372, 1.1122868293970594, -0.07171106666151701],
[-0.07637294974672142, -0.4214933239627914, 1.5869240244272418],
[1.2268798758459243, -0.5578149944602171, 0.2813910456659647],
[-0.0405757452148008, 1.1122868032803170, -0.0717110580655164],
[-0.0763729366746601, -0.4214933324022432, 1.5869240198367816],
];
const OKLabtoLMS = [
[0.99999999845051981432, 0.39633779217376785678, 0.21580375806075880339],
[1.0000000088817607767, -0.1055613423236563494, -0.063854174771705903402],
[1.0000000546724109177, -0.089484182094965759684, -1.2914855378640917399],
[1.0000000000000000, 0.3963377773761749, 0.2158037573099136],
[1.0000000000000000, -0.1055613458156586, -0.0638541728258133],
[1.0000000000000000, -0.0894841775298119, -1.2914855480194092],
];

const LMSnl = multiplyMatrices(OKLabtoLMS, OKLab) as Color;
Expand Down
12 changes: 6 additions & 6 deletions packages/color-helpers/src/conversions/xyz-to-oklab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import { multiplyMatrices } from 'calculations/multiply-matrices';
export function XYZ_to_OKLab(XYZ: Color): Color {
// Given XYZ relative to D65, convert to OKLab
const XYZtoLMS = [
[0.8190224432164319, 0.3619062562801221, -0.12887378261216414],
[0.0329836671980271, 0.9292868468965546, 0.03614466816999844],
[0.048177199566046255, 0.26423952494422764, 0.6335478258136937],
[0.8190224379967030, 0.3619062600528904, -0.1288737815209879],
[0.0329836539323885, 0.9292868615863434, 0.0361446663506424],
[0.0481771893596242, 0.2642395317527308, 0.6335478284694309],
];
const LMStoOKLab = [
[0.2104542553, 0.7936177850, -0.0040720468],
[1.9779984951, -2.4285922050, 0.4505937099],
[0.0259040371, 0.7827717662, -0.8086757660],
[0.2104542683093140, 0.7936177747023054, -0.0040720430116193],
[1.9779985324311684, -2.4285922420485799, 0.4505937096174110],
[0.0259040424655478, 0.7827717124575296, -0.8086757549230774],
];

const LMS = multiplyMatrices(XYZtoLMS, XYZ) as Color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { serialize_OKLCH_data } from '../util/serialize.mjs';
const tests = [
['color-mix(in oklch, oklch(100% 0% 60deg), oklch(50% 50% 0deg))', 'oklch(0.75 0.1 0)'],
['color-mix(in oklch, rgb(255, 255, 255), rgb(180, 6, 95))', 'oklch(0.75031 0.10016 359.858)'],
['color-mix(in lch, oklch(75% 0% 60deg), oklch(75% 50% 0deg))', 'oklch(0.74979 0.09824 0.1059)'],
['color-mix(in lch, oklch(75% 0% 60deg), oklch(75% 50% 0deg))', 'oklch(0.74979 0.09824 0.10588)'],
['color-mix(in oklch, oklch(100% 0% none), oklch(50% 50% 0deg))', 'oklch(0.75 0.1 0)'],
['color-mix(in oklch, oklch(100% none 60deg), oklch(50% 50% 0deg))', 'oklch(0.75 0.2 0)'],
];
Expand Down
2 changes: 1 addition & 1 deletion packages/css-color-parser/test/wpt/color-computed-lab.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const tests = [
['oklab(0.2 0 0.1/50%)', 'rgba(31, 20, 0, 0.5)', 'color(display-p3 0.11443 0.08142 0 / 0.5)'],
['oklab(4 0 0.1/50%)', 'rgba(255, 255, 255, 0.5)', 'color(display-p3 1 1 1 / 0.5)'],
['oklab(0.5 -1.6 1.6)', 'rgb(53, 117, 0)', 'color(display-p3 0.25974 0.45977 0)'],
['oklab(0.5 -2 2)', 'rgb(55, 117, 0)', 'color(display-p3 0.25973 0.45977 0)'],
['oklab(0.5 -2 2)', 'rgb(55, 117, 0)', 'color(display-p3 0.25974 0.45977 0)'],
['oklab(0 0 0 / -10%)', 'rgba(0, 0, 0, 0)', 'color(display-p3 0 0 0 / 0)'],
['oklab(0 0 0 / 110%)', 'rgb(0, 0, 0)', 'color(display-p3 0 0 0)'],
['oklab(0 0 0 / 300%)', 'rgb(0, 0, 0)', 'color(display-p3 0 0 0)'],
Expand Down
4 changes: 2 additions & 2 deletions packages/css-color-parser/test/wpt/color-computed-oklab.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const tests = [
['oklab(0.2 0 0.1/0.5)', 'rgba(31, 20, 0, 0.5)', 'color(display-p3 0.11443 0.08142 0 / 0.5)'],
['oklab(0.2 0 0.1/50%)', 'rgba(31, 20, 0, 0.5)', 'color(display-p3 0.11443 0.08142 0 / 0.5)'],
['oklab(4 0 0.1/50%)', 'rgba(255, 255, 255, 0.5)', 'color(display-p3 1 1 1 / 0.5)'],
['oklab(0.5 -0.4 0.4)', 'rgb(53, 117, 0)', 'color(display-p3 0.25974 0.45978 0)'],
['oklab(0.5 -0.4 0.4)', 'rgb(53, 117, 0)', 'color(display-p3 0.25974 0.45977 0)'],
['oklab(0.5 -1 1)', 'rgb(55, 117, 0)', 'color(display-p3 0.25974 0.45977 0)'],
['oklab(0 0 0 / -10%)', 'rgba(0, 0, 0, 0)', 'color(display-p3 0 0 0 / 0)'],
['oklab(0 0 0 / 110%)', 'rgb(0, 0, 0)', 'color(display-p3 0 0 0)'],
Expand All @@ -31,7 +31,7 @@ const tests = [
['oklab(0.5 -0.1 0)', 'rgb(0, 116, 101)', 'color(display-p3 0.1594 0.45196 0.39888)'],
['oklab(0.5 0 -0.1)', 'rgb(77, 95, 156)', 'color(display-p3 0.31641 0.3713 0.59541)'],
['oklab(calc(0.50 * 3) calc(0.5 - 1) calc(1.5) / calc(-0.5 + 1))', 'rgba(255, 255, 255, 0.5)', 'color(display-p3 1 1 1 / 0.5)'],
['oklab(calc(0.50 / 3) calc(0.5 - 1) calc(1.5) / calc(-0.5 + 1))', 'rgba(17, 16, 0, 0.5)', 'color(display-p3 0.06561 0.06186 0 / 0.5)'],
['oklab(calc(0.50 / 3) calc(0.5 - 1) calc(1.5) / calc(-0.5 + 1))', 'rgba(17, 16, 0, 0.5)', 'color(display-p3 0.06561 0.06185 0 / 0.5)'],
['oklab(calc(-0.50 * 3) calc(0.5 + 1) calc(-1.5) / calc(-0.5 * 2))', 'rgba(0, 0, 0, 0)', 'color(display-p3 0 0 0 / 0)'],

['oklab(none none none / none)', 'rgba(0, 0, 0, 0)', 'color(display-p3 0 0 0 / 0)'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
2 changes: 1 addition & 1 deletion plugin-packs/postcss-preset-env/test/basic.ch38.expect.css
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
2 changes: 1 addition & 1 deletion plugin-packs/postcss-preset-env/test/basic.expect.css
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
2 changes: 1 addition & 1 deletion plugin-packs/postcss-preset-env/test/basic.ff49.expect.css
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
2 changes: 1 addition & 1 deletion plugin-packs/postcss-preset-env/test/basic.ff66.expect.css
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
2 changes: 1 addition & 1 deletion plugin-packs/postcss-preset-env/test/basic.ie10.expect.css
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe
color-3: rgba(0, 0, 255, 0.65);
color-3: color-mix(in xyz, rgb(255 0 0 / 0), blue 65%);
color-4: rgba(122, 0, 182, 0.65);
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-4: color-mix(in oklch, rgb(255 0 0 / 0), blue 65%);
color-5: rgba(149, 0, 122, 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe

@media (color-gamut: p3) {
.color-mix {
color-4: color(display-p3 0.44471 0 0.71665 / 0.65);
color-4: color(display-p3 0.4447 0 0.71665 / 0.65);
color-5: color(display-p3 0.55417 0 0.48083 / 0.65);
}
}
Expand Down
Loading