From 1b07638e9fef117cf319e57c018eea70ecb7407e Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Sun, 21 Apr 2024 10:54:56 +0200 Subject: [PATCH 1/2] update to latest gamut mapping algorithm --- packages/color-helpers/dist/index.cjs | 32 +++--- packages/color-helpers/dist/index.mjs | 2 +- .../src/calculations/map-gamut.ts | 52 +++++++-- .../test/basic/color-function.mjs | 36 +++--- .../test/basic/color-mix-function.mjs | 20 ++-- packages/css-color-parser/test/basic/lab.mjs | 2 +- packages/css-color-parser/test/basic/lch.mjs | 2 +- .../test/basic/relative-color.mjs | 108 +++++++++--------- .../test/wpt/color-computed-lab.mjs | 58 +++++----- .../test/wpt/color-computed-oklab.mjs | 12 +- .../wpt/color-computed-relative-color.mjs | 6 +- .../test/basic.autoprefixer.expect.css | 38 +++--- .../test/basic.autoprefixer.false.expect.css | 38 +++--- ...basic.autoprefixer.remove.false.expect.css | 38 +++--- .../test/basic.ch38.expect.css | 38 +++--- .../test/basic.ch88-ff78-saf10.expect.css | 38 +++--- .../test/basic.ch88-ff78.expect.css | 38 +++--- .../basic.ch88-ff78.no-is-pseudo.expect.css | 38 +++--- .../postcss-preset-env/test/basic.expect.css | 38 +++--- .../test/basic.ff49.expect.css | 38 +++--- .../test/basic.ff66.expect.css | 38 +++--- ...ebrew.all-browsers-have-support.expect.css | 32 +++--- .../test/basic.hebrew.expect.css | 38 +++--- .../test/basic.ie10.expect.css | 38 +++--- .../test/basic.nesting.false.expect.css | 38 +++--- .../test/basic.op_mini.expect.css | 38 +++--- .../test/basic.preserve.false.expect.css | 36 +++--- .../test/basic.preserve.true.expect.css | 40 +++---- .../test/basic.safari15.expect.css | 38 +++--- .../test/basic.stage0-ff49.expect.css | 38 +++--- .../test/basic.stage0-ff66.expect.css | 38 +++--- .../test/basic.stage0.expect.css | 38 +++--- .../test/basic.supports-query.expect.css | 38 +++--- .../test/basic.vendors-1.expect.css | 36 +++--- .../test/basic.vendors-2.expect.css | 36 +++--- .../test/basic.vendors-3.expect.css | 38 +++--- .../test/layers-basic.expect.css | 12 +- .../layers-basic.preserve.true.expect.css | 12 +- .../test/basic.expect.css | 74 ++++++------ .../test/basic.preserve-true.expect.css | 74 ++++++------ .../test/basic.with-cloned-rules.expect.css | 76 ++++++------ .../test/lab-function-interop.expect.css | 4 +- ...function-interop.preserve.false.expect.css | 4 +- .../test/basic.expect.css | 30 ++--- .../test/basic.preserve-true.expect.css | 30 ++--- .../test/basic.with-cloned-rules.expect.css | 30 ++--- .../test/variables.expect.css | 4 +- .../test/variables.preserve-true.expect.css | 4 +- .../postcss-contrast-color-function/README.md | 8 +- .../test/basic.expect.css | 18 +-- .../test/examples/example.expect.css | 4 +- .../example.preserve-false.expect.css | 4 +- .../test/variables.expect.css | 8 +- .../test/variables.preserve-false.expect.css | 8 +- plugins/postcss-gamut-mapping/README.md | 4 +- .../test/basic.expect.css | 16 +-- .../test/examples/example.expect.css | 4 +- .../test/basic.display-p3-false.expect.css | 52 ++++----- ....display-p3-false.preserve-true.expect.css | 52 ++++----- .../test/basic.expect.css | 62 +++++----- .../test/basic.preserve-true.expect.css | 62 +++++----- .../test/basic.with-cloned-rules.expect.css | 62 +++++----- .../variables.display-p3-false.expect.css | 4 +- ....display-p3-false.preserve-true.expect.css | 4 +- .../test/variables.expect.css | 6 +- .../test/variables.preserve-true.expect.css | 6 +- .../test/basic.expect.css | 36 +++--- ....preserve-true.display-p3-false.expect.css | 30 ++--- .../test/basic.preserve-true.expect.css | 36 +++--- .../test/variables.expect.css | 12 +- ....preserve-true.display-p3-false.expect.css | 6 +- .../test/variables.preserve-true.expect.css | 12 +- .../test/basic.expect.css | 20 ++-- .../test/basic.preserve-true.expect.css | 20 ++-- 74 files changed, 1108 insertions(+), 1072 deletions(-) diff --git a/packages/color-helpers/dist/index.cjs b/packages/color-helpers/dist/index.cjs index c0ec1c752..6c1479be4 100644 --- a/packages/color-helpers/dist/index.cjs +++ b/packages/color-helpers/dist/index.cjs @@ -7,7 +7,7 @@ * @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/multiply-matrices.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang). * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/multiply-matrices.js - */function multiplyMatrices(t,o){const _=t.length;let n,e;n=Array.isArray(t[0])?t:[t],e=Array.isArray(o[0])?o:o.map((t=>[t]));const r=e[0].length,a=e[0].map(((t,o)=>e.map((t=>t[o]))));let i=n.map((t=>a.map((o=>Array.isArray(t)?t.reduce(((t,_,n)=>t+_*(o[n]||0)),0):o.reduce(((o,_)=>o+_*t),0)))));return 1===_&&(i=i[0]),1===r?i.map((t=>t[0])):i} + */function multiplyMatrices(t,_){const o=t.length;let e,n;e=Array.isArray(t[0])?t:[t],n=Array.isArray(_[0])?_:_.map((t=>[t]));const r=n[0].length,a=n[0].map(((t,_)=>n.map((t=>t[_]))));let i=e.map((t=>a.map((_=>Array.isArray(t)?t.reduce(((t,o,e)=>t+o*(_[e]||0)),0):_.reduce(((_,o)=>_+o*t),0)))));return 1===o&&(i=i[0]),1===r?i.map((t=>t[0])):i} /** * Bradford chromatic adaptation from D65 to D50 * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document @@ -23,7 +23,7 @@ * @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/hslToRgb.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang). * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/hslToRgb.js - */function HSL_to_sRGB(t){let o=t[0],_=t[1],n=t[2];function f(t){const e=(t+o/30)%12,r=_*Math.min(n,1-n);return n-r*Math.max(-1,Math.min(e-3,9-e,1))}return o%=360,o<0&&(o+=360),_/=100,n/=100,[f(0),f(8),f(4)]} + */function HSL_to_sRGB(t){let _=t[0],o=t[1],e=t[2];function f(t){const n=(t+_/30)%12,r=o*Math.min(e,1-e);return e-r*Math.max(-1,Math.min(n-3,9-n,1))}return _%=360,_<0&&(_+=360),o/=100,e/=100,[f(0),f(8),f(4)]} /** * @param {number} hue - Hue as degrees 0..360 * @param {number} white - Whiteness as percentage 0..100 @@ -33,7 +33,7 @@ * @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/hwbToRgb.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang). * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/hwbToRgb.js - */function HWB_to_sRGB(t){const o=t[0];let _=t[1],n=t[2];if(_/=100,n/=100,_+n>=1){const t=_/(_+n);return[t,t,t]}const e=HSL_to_sRGB([o,100,50]);for(let t=0;t<3;t++)e[t]*=1-_-n,e[t]+=_;return e} + */function HWB_to_sRGB(t){const _=t[0];let o=t[1],e=t[2];if(o/=100,e/=100,o+e>=1){const t=o/(o+e);return[t,t,t]}const n=HSL_to_sRGB([_,100,50]);for(let t=0;t<3;t++)n[t]*=1-o-e,n[t]+=o;return n} /** * @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). @@ -43,7 +43,7 @@ * @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 - */function Lab_to_XYZ(o){const _=24389/27,n=216/24389,e=[];e[1]=(o[0]+16)/116,e[0]=o[1]/500+e[1],e[2]=e[1]-o[2]/200;return[Math.pow(e[0],3)>n?Math.pow(e[0],3):(116*e[0]-16)/_,o[0]>8?Math.pow((o[0]+16)/116,3):o[0]/_,Math.pow(e[2],3)>n?Math.pow(e[2],3):(116*e[2]-16)/_].map(((o,_)=>o*t[_]))} + */function Lab_to_XYZ(_){const o=24389/27,e=216/24389,n=[];n[1]=(_[0]+16)/116,n[0]=_[1]/500+n[1],n[2]=n[1]-_[2]/200;return[Math.pow(n[0],3)>e?Math.pow(n[0],3):(116*n[0]-16)/o,_[0]>8?Math.pow((_[0]+16)/116,3):_[0]/o,Math.pow(n[2],3)>e?Math.pow(n[2],3):(116*n[2]-16)/o].map(((_,o)=>_*t[o]))} /** * @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). @@ -55,7 +55,7 @@ * @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 - */function OKLab_to_XYZ(t){const o=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]],o.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 rec2020 RGB values in the range 0.0 - 1.0 * to linear light (un-companded) form. @@ -63,7 +63,7 @@ * * @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). - */function lin_2020(t){const o=1.09929682680944;return t.map((function(t){const _=t<0?-1:1,n=Math.abs(t);return n<.08124285829863151?t/4.5:_*Math.pow((n+o-1)/o,1/.45)}))} + */function lin_2020(t){const _=1.09929682680944;return t.map((function(t){const o=t<0?-1:1,e=Math.abs(t);return e<.08124285829863151?t/4.5:o*Math.pow((e+_-1)/_,1/.45)}))} /** * Convert an array of linear-light rec2020 values to CIE XYZ * using D65 (no chromatic adaptation) @@ -83,7 +83,7 @@ * @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 */ -function lin_sRGB(t){return t.map((function(t){const o=t<0?-1:1,_=Math.abs(t);return _<=.04045?t/12.92:o*Math.pow((_+.055)/1.055,2.4)}))} +function lin_sRGB(t){return t.map((function(t){const _=t<0?-1:1,o=Math.abs(t);return o<=.04045?t/12.92:_*Math.pow((o+.055)/1.055,2.4)}))} /** * Convert an array of display-p3 RGB values in the range 0.0 - 1.0 * to linear light (un-companded) form. @@ -134,7 +134,7 @@ function lin_sRGB_to_XYZ(t){return multiplyMatrices([[506752/1228815,87881/24576 * @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 - */function gam_sRGB(t){return t.map((function(t){const o=t<0?-1:1,_=Math.abs(t);return _>.0031308?o*(1.055*Math.pow(_,1/2.4)-.055):12.92*t}))} + */function gam_sRGB(t){return t.map((function(t){const _=t<0?-1:1,o=Math.abs(t);return o>.0031308?_*(1.055*Math.pow(o,1/2.4)-.055):12.92*t}))} /** * Convert an array of gamma-corrected sRGB values in the 0.0 to 1.0 range to HSL. * @@ -148,7 +148,7 @@ function lin_sRGB_to_XYZ(t){return multiplyMatrices([[506752/1228815,87881/24576 * @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). * * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/better-rgbToHsl.js - */function sRGB_to_HSL(t){const o=t[0],_=t[1],n=t[2],e=Math.max(o,_,n),r=Math.min(o,_,n),a=(r+e)/2,i=e-r;let l=NaN,u=0;if(0!==Math.round(1e5*i)){switch(u=0===Math.round(1e5*a)||1e5===Math.round(1e5*a)?0:(e-a)/Math.min(a,1-a),e){case o:l=(_-n)/i+(_=360&&(l-=360),[l,100*u,100*a]} + */function sRGB_to_HSL(t){const _=t[0],o=t[1],e=t[2],n=Math.max(_,o,e),r=Math.min(_,o,e),a=(r+n)/2,i=n-r;let l=NaN,u=0;if(0!==Math.round(1e5*i)){switch(u=0===Math.round(1e5*a)||1e5===Math.round(1e5*a)?0:(n-a)/Math.min(a,1-a),n){case _:l=(o-e)/i+(o=360&&(l-=360),[l,100*u,100*a]} /** * Convert XYZ to linear-light P3 * @@ -168,23 +168,23 @@ function lin_sRGB_to_XYZ(t){return multiplyMatrices([[506752/1228815,87881/24576 * * @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). - */function XYZ_to_Lab(o){const _=216/24389,n=24389/27,e=o.map(((o,_)=>o/t[_])).map((t=>t>_?Math.cbrt(t):(n*t+16)/116));return[116*e[1]-16,500*(e[0]-e[1]),200*(e[1]-e[2])]} + */function XYZ_to_Lab(_){const o=216/24389,e=24389/27,n=_.map(((_,o)=>_/t[o])).map((t=>t>o?Math.cbrt(t):(e*t+16)/116));return[116*n[1]-16,500*(n[0]-n[1]),200*(n[1]-n[2])]} /** * @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 - */function XYZ_to_OKLab(t){const o=multiplyMatrices([[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],t);return multiplyMatrices([[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],o.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))))} /** * @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). - */function Lab_to_LCH(t){const o=180*Math.atan2(t[2],t[1])/Math.PI;return[t[0],Math.sqrt(Math.pow(t[1],2)+Math.pow(t[2],2)),o>=0?o:o+360]} + */function Lab_to_LCH(t){const _=180*Math.atan2(t[2],t[1])/Math.PI;return[t[0],Math.sqrt(Math.pow(t[1],2)+Math.pow(t[2],2)),_>=0?_:_+360]} /** * @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 - */function OKLab_to_OKLCH(t){const o=180*Math.atan2(t[2],t[1])/Math.PI;return[t[0],Math.sqrt(t[1]**2+t[2]**2),o>=0?o:o+360]} + */function OKLab_to_OKLCH(t){const _=180*Math.atan2(t[2],t[1])/Math.PI;return[t[0],Math.sqrt(t[1]**2+t[2]**2),_>=0?_:_+360]} /** * Convert XYZ to linear-light a98-rgb * @@ -198,7 +198,7 @@ function lin_sRGB_to_XYZ(t){return multiplyMatrices([[506752/1228815,87881/24576 * @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). */ -function gam_2020(t){const o=1.09929682680944;return t.map((function(t){const _=t<0?-1:1,n=Math.abs(t);return n>.018053968510807?_*(o*Math.pow(n,.45)-(o-1)):4.5*t}))} +function gam_2020(t){const _=1.09929682680944;return t.map((function(t){const o=t<0?-1:1,e=Math.abs(t);return e>.018053968510807?o*(_*Math.pow(e,.45)-(_-1)):4.5*t}))} /** * Convert D50 XYZ to linear-light prophoto-rgb * @@ -214,7 +214,7 @@ function gam_2020(t){const o=1.09929682680944;return t.map((function(t){const _= * @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). */ -function gam_ProPhoto(t){const o=1/512;return t.map((function(t){const _=t<0?-1:1,n=Math.abs(t);return n>=o?_*Math.pow(n,1/1.8):16*t}))}function inGamut(t){const[o,_,n]=t;return o>=-1e-4&&o<=1.0001&&_>=-1e-4&&_<=1.0001&&n>=-1e-4&&n<=1.0001}function clip(t){return t.map((t=>t<0?0:t>1?1:t))} +function gam_ProPhoto(t){const _=1/512;return t.map((function(t){const o=t<0?-1:1,e=Math.abs(t);return e>=_?o*Math.pow(e,1/1.8):16*t}))}function inGamut(t){const[_,o,e]=t;return _>=-1e-4&&_<=1.0001&&o>=-1e-4&&o<=1.0001&&e>=-1e-4&&e<=1.0001}function clip(t){return t.map((t=>t<0?0:t>1?1:t))} /** * @description Calculate deltaE OK which is the simple root sum of squares * @param {number[]} reference - Array of OKLab values: L as 0..1, a and b as -1..1 @@ -224,4 +224,4 @@ function gam_ProPhoto(t){const o=1/512;return t.map((function(t){const _=t<0?-1: * @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/deltaEOK.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang). * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/deltaEOK.js - */function deltaEOK(t,o){const[_,n,e]=t,[r,a,i]=o,l=_-r,u=n-a,s=e-i;return Math.sqrt(l**2+u**2+s**2)}function luminance(t){const[o,_,n]=t.map((t=>t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)));return.2126*o+.7152*_+.0722*n}exports.HSL_to_XYZ_D50=function HSL_to_XYZ_D50(t){let o=t;return o=HSL_to_sRGB(o),o=lin_sRGB(o),o=lin_sRGB_to_XYZ(o),o=D65_to_D50(o),o},exports.HWB_to_XYZ_D50=function HWB_to_XYZ_D50(t){let o=t;return o=HWB_to_sRGB(o),o=lin_sRGB(o),o=lin_sRGB_to_XYZ(o),o=D65_to_D50(o),o},exports.LCH_to_XYZ_D50=function LCH_to_XYZ_D50(t){let o=t;var _;return o=[(_=o)[0],_[1]*Math.cos(_[2]*Math.PI/180),_[1]*Math.sin(_[2]*Math.PI/180)],o=Lab_to_XYZ(o),o},exports.Lab_to_XYZ_D50=function Lab_to_XYZ_D50(t){let o=t;return o=Lab_to_XYZ(o),o},exports.OKLCH_to_OKLab=OKLCH_to_OKLab,exports.OKLCH_to_XYZ_D50=function OKLCH_to_XYZ_D50(t){let o=t;return o=OKLCH_to_OKLab(o),o=OKLab_to_XYZ(o),o=D65_to_D50(o),o},exports.OKLab_to_OKLCH=OKLab_to_OKLCH,exports.OKLab_to_XYZ=OKLab_to_XYZ,exports.OKLab_to_XYZ_D50=function OKLab_to_XYZ_D50(t){let o=t;return o=OKLab_to_XYZ(o),o=D65_to_D50(o),o},exports.P3_to_XYZ_D50=function P3_to_XYZ_D50(t){let o=t;return o=lin_P3(o),o=lin_P3_to_XYZ(o),o=D65_to_D50(o),o},exports.ProPhoto_RGB_to_XYZ_D50=function ProPhoto_RGB_to_XYZ_D50(t){let o=t;return o=o.map((function(t){const o=t<0?-1:1,_=Math.abs(t);return _<=.03125?t/16:o*Math.pow(_,1.8)})),o=multiplyMatrices([[.7977666449006423,.13518129740053308,.0313477341283922],[.2880748288194013,.711835234241873,8993693872564e-17],[0,0,.8251046025104602]],o),o},exports.XYZ_D50_to_HSL=function XYZ_D50_to_HSL(t){let o=t;return o=D50_to_D65(o),o=XYZ_to_lin_sRGB(o),o=gam_sRGB(o),o=sRGB_to_HSL(o),o},exports.XYZ_D50_to_HWB=function XYZ_D50_to_HWB(t){let o=t;o=D50_to_D65(o),o=XYZ_to_lin_sRGB(o);const _=gam_sRGB(o);o=sRGB_to_HSL(_);const n=Math.min(_[0],_[1],_[2]),e=1-Math.max(_[0],_[1],_[2]);return[o[0],100*n,100*e]},exports.XYZ_D50_to_LCH=function XYZ_D50_to_LCH(t){let o=t;return o=XYZ_to_Lab(o),o=Lab_to_LCH(o),o},exports.XYZ_D50_to_Lab=function XYZ_D50_to_Lab(t){let o=t;return o=XYZ_to_Lab(o),o},exports.XYZ_D50_to_OKLCH=function XYZ_D50_to_OKLCH(t){let o=t;return o=D50_to_D65(o),o=XYZ_to_OKLab(o),o=OKLab_to_OKLCH(o),o},exports.XYZ_D50_to_OKLab=function XYZ_D50_to_OKLab(t){let o=t;return o=D50_to_D65(o),o=XYZ_to_OKLab(o),o},exports.XYZ_D50_to_P3=function XYZ_D50_to_P3(t){let o=t;return o=D50_to_D65(o),o=XYZ_to_lin_P3(o),o=gam_P3(o),o},exports.XYZ_D50_to_ProPhoto=function XYZ_D50_to_ProPhoto(t){let o=t;return o=multiplyMatrices([[1.3457868816471583,-.25557208737979464,-.05110186497554526],[-.5446307051249019,1.5082477428451468,.02052744743642139],[0,0,1.2119675456389452]],o),o=gam_ProPhoto(o),o},exports.XYZ_D50_to_XYZ_D50=function XYZ_D50_to_XYZ_D50(t){return t},exports.XYZ_D50_to_XYZ_D65=function XYZ_D50_to_XYZ_D65(t){let o=t;return o=D50_to_D65(o),o},exports.XYZ_D50_to_a98_RGB=function XYZ_D50_to_a98_RGB(t){let o=t;return o=D50_to_D65(o),o=multiplyMatrices([[1829569/896150,-506331/896150,-308931/896150],[-851781/878810,1648619/878810,36519/878810],[16779/1248040,-147721/1248040,1266979/1248040]],o),o=o.map((function(t){const o=t<0?-1:1,_=Math.abs(t);return o*Math.pow(_,256/563)})),o},exports.XYZ_D50_to_lin_sRGB=function XYZ_D50_to_lin_sRGB(t){let o=t;return o=D50_to_D65(o),o=XYZ_to_lin_sRGB(o),o},exports.XYZ_D50_to_rec_2020=function XYZ_D50_to_rec_2020(t){let o=t;return o=D50_to_D65(o),o=multiplyMatrices([[30757411/17917100,-6372589/17917100,-4539589/17917100],[-.666684351832489,1.616481236634939,467509/29648200],[792561/44930125,-1921689/44930125,.942103121235474]],o),o=gam_2020(o),o},exports.XYZ_D50_to_sRGB=function XYZ_D50_to_sRGB(t){let o=t;return o=D50_to_D65(o),o=XYZ_to_lin_sRGB(o),o=gam_sRGB(o),o},exports.XYZ_D65_to_XYZ_D50=function XYZ_D65_to_XYZ_D50(t){let o=t;return o=D65_to_D50(o),o},exports.XYZ_to_OKLab=XYZ_to_OKLab,exports.XYZ_to_lin_P3=XYZ_to_lin_P3,exports.XYZ_to_lin_sRGB=XYZ_to_lin_sRGB,exports.a98_RGB_to_XYZ_D50=function a98_RGB_to_XYZ_D50(t){let o=t;return o=o.map((function(t){const o=t<0?-1:1,_=Math.abs(t);return o*Math.pow(_,563/256)})),o=multiplyMatrices([[573536/994567,263643/1420810,187206/994567],[591459/1989134,6239551/9945670,374412/4972835],[53769/1989134,351524/4972835,4929758/4972835]],o),o=D65_to_D50(o),o},exports.clip=clip,exports.contrast_ratio_wcag_2_1=function contrast_ratio_wcag_2_1(t,o){const _=luminance(t),n=luminance(o);return(Math.max(_,n)+.05)/(Math.min(_,n)+.05)},exports.gam_P3=gam_P3,exports.gam_sRGB=gam_sRGB,exports.inGamut=inGamut,exports.lin_P3=lin_P3,exports.lin_P3_to_XYZ=lin_P3_to_XYZ,exports.lin_sRGB=lin_sRGB,exports.lin_sRGB_to_XYZ=lin_sRGB_to_XYZ,exports.lin_sRGB_to_XYZ_D50=function lin_sRGB_to_XYZ_D50(t){let o=t;return o=lin_sRGB_to_XYZ(o),o=D65_to_D50(o),o},exports.mapGamut=function mapGamut(t,o,_){const n=t;let e=0,r=n[1];for(;r-e>1e-5;){const t=(e+r)/2;n[1]=t;const a=o(n);if(inGamut(a)){e=t;continue}const i=clip(a);if(deltaEOK(OKLCH_to_OKLab(_(i)),OKLCH_to_OKLab(n))<.02)return i;r=t}return clip(o([...n]))},exports.namedColors={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},exports.rec_2020_to_XYZ_D50=function rec_2020_to_XYZ_D50(t){let o=t;return o=lin_2020(o),o=multiplyMatrices([[63426534/99577255,20160776/139408157,47086771/278816314],[26158966/99577255,.677998071518871,8267143/139408157],[0,19567812/697040785,1.0609850577107909]],o),o=D65_to_D50(o),o},exports.sRGB_to_XYZ_D50=function sRGB_to_XYZ_D50(t){let o=t;return o=lin_sRGB(o),o=lin_sRGB_to_XYZ(o),o=D65_to_D50(o),o}; + */function deltaEOK(t,_){const[o,e,n]=t,[r,a,i]=_,l=o-r,u=e-a,s=n-i;return Math.sqrt(l**2+u**2+s**2)}const _=.02,o=1e-4;function luminance(t){const[_,o,e]=t.map((t=>t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)));return.2126*_+.7152*o+.0722*e}exports.HSL_to_XYZ_D50=function HSL_to_XYZ_D50(t){let _=t;return _=HSL_to_sRGB(_),_=lin_sRGB(_),_=lin_sRGB_to_XYZ(_),_=D65_to_D50(_),_},exports.HWB_to_XYZ_D50=function HWB_to_XYZ_D50(t){let _=t;return _=HWB_to_sRGB(_),_=lin_sRGB(_),_=lin_sRGB_to_XYZ(_),_=D65_to_D50(_),_},exports.LCH_to_XYZ_D50=function LCH_to_XYZ_D50(t){let _=t;var o;return _=[(o=_)[0],o[1]*Math.cos(o[2]*Math.PI/180),o[1]*Math.sin(o[2]*Math.PI/180)],_=Lab_to_XYZ(_),_},exports.Lab_to_XYZ_D50=function Lab_to_XYZ_D50(t){let _=t;return _=Lab_to_XYZ(_),_},exports.OKLCH_to_OKLab=OKLCH_to_OKLab,exports.OKLCH_to_XYZ_D50=function OKLCH_to_XYZ_D50(t){let _=t;return _=OKLCH_to_OKLab(_),_=OKLab_to_XYZ(_),_=D65_to_D50(_),_},exports.OKLab_to_OKLCH=OKLab_to_OKLCH,exports.OKLab_to_XYZ=OKLab_to_XYZ,exports.OKLab_to_XYZ_D50=function OKLab_to_XYZ_D50(t){let _=t;return _=OKLab_to_XYZ(_),_=D65_to_D50(_),_},exports.P3_to_XYZ_D50=function P3_to_XYZ_D50(t){let _=t;return _=lin_P3(_),_=lin_P3_to_XYZ(_),_=D65_to_D50(_),_},exports.ProPhoto_RGB_to_XYZ_D50=function ProPhoto_RGB_to_XYZ_D50(t){let _=t;return _=_.map((function(t){const _=t<0?-1:1,o=Math.abs(t);return o<=.03125?t/16:_*Math.pow(o,1.8)})),_=multiplyMatrices([[.7977666449006423,.13518129740053308,.0313477341283922],[.2880748288194013,.711835234241873,8993693872564e-17],[0,0,.8251046025104602]],_),_},exports.XYZ_D50_to_HSL=function XYZ_D50_to_HSL(t){let _=t;return _=D50_to_D65(_),_=XYZ_to_lin_sRGB(_),_=gam_sRGB(_),_=sRGB_to_HSL(_),_},exports.XYZ_D50_to_HWB=function XYZ_D50_to_HWB(t){let _=t;_=D50_to_D65(_),_=XYZ_to_lin_sRGB(_);const o=gam_sRGB(_);_=sRGB_to_HSL(o);const e=Math.min(o[0],o[1],o[2]),n=1-Math.max(o[0],o[1],o[2]);return[_[0],100*e,100*n]},exports.XYZ_D50_to_LCH=function XYZ_D50_to_LCH(t){let _=t;return _=XYZ_to_Lab(_),_=Lab_to_LCH(_),_},exports.XYZ_D50_to_Lab=function XYZ_D50_to_Lab(t){let _=t;return _=XYZ_to_Lab(_),_},exports.XYZ_D50_to_OKLCH=function XYZ_D50_to_OKLCH(t){let _=t;return _=D50_to_D65(_),_=XYZ_to_OKLab(_),_=OKLab_to_OKLCH(_),_},exports.XYZ_D50_to_OKLab=function XYZ_D50_to_OKLab(t){let _=t;return _=D50_to_D65(_),_=XYZ_to_OKLab(_),_},exports.XYZ_D50_to_P3=function XYZ_D50_to_P3(t){let _=t;return _=D50_to_D65(_),_=XYZ_to_lin_P3(_),_=gam_P3(_),_},exports.XYZ_D50_to_ProPhoto=function XYZ_D50_to_ProPhoto(t){let _=t;return _=multiplyMatrices([[1.3457868816471583,-.25557208737979464,-.05110186497554526],[-.5446307051249019,1.5082477428451468,.02052744743642139],[0,0,1.2119675456389452]],_),_=gam_ProPhoto(_),_},exports.XYZ_D50_to_XYZ_D50=function XYZ_D50_to_XYZ_D50(t){return t},exports.XYZ_D50_to_XYZ_D65=function XYZ_D50_to_XYZ_D65(t){let _=t;return _=D50_to_D65(_),_},exports.XYZ_D50_to_a98_RGB=function XYZ_D50_to_a98_RGB(t){let _=t;return _=D50_to_D65(_),_=multiplyMatrices([[1829569/896150,-506331/896150,-308931/896150],[-851781/878810,1648619/878810,36519/878810],[16779/1248040,-147721/1248040,1266979/1248040]],_),_=_.map((function(t){const _=t<0?-1:1,o=Math.abs(t);return _*Math.pow(o,256/563)})),_},exports.XYZ_D50_to_lin_sRGB=function XYZ_D50_to_lin_sRGB(t){let _=t;return _=D50_to_D65(_),_=XYZ_to_lin_sRGB(_),_},exports.XYZ_D50_to_rec_2020=function XYZ_D50_to_rec_2020(t){let _=t;return _=D50_to_D65(_),_=multiplyMatrices([[30757411/17917100,-6372589/17917100,-4539589/17917100],[-.666684351832489,1.616481236634939,467509/29648200],[792561/44930125,-1921689/44930125,.942103121235474]],_),_=gam_2020(_),_},exports.XYZ_D50_to_sRGB=function XYZ_D50_to_sRGB(t){let _=t;return _=D50_to_D65(_),_=XYZ_to_lin_sRGB(_),_=gam_sRGB(_),_},exports.XYZ_D65_to_XYZ_D50=function XYZ_D65_to_XYZ_D50(t){let _=t;return _=D65_to_D50(_),_},exports.XYZ_to_OKLab=XYZ_to_OKLab,exports.XYZ_to_lin_P3=XYZ_to_lin_P3,exports.XYZ_to_lin_sRGB=XYZ_to_lin_sRGB,exports.a98_RGB_to_XYZ_D50=function a98_RGB_to_XYZ_D50(t){let _=t;return _=_.map((function(t){const _=t<0?-1:1,o=Math.abs(t);return _*Math.pow(o,563/256)})),_=multiplyMatrices([[573536/994567,263643/1420810,187206/994567],[591459/1989134,6239551/9945670,374412/4972835],[53769/1989134,351524/4972835,4929758/4972835]],_),_=D65_to_D50(_),_},exports.clip=clip,exports.contrast_ratio_wcag_2_1=function contrast_ratio_wcag_2_1(t,_){const o=luminance(t),e=luminance(_);return(Math.max(o,e)+.05)/(Math.min(o,e)+.05)},exports.gam_P3=gam_P3,exports.gam_sRGB=gam_sRGB,exports.inGamut=inGamut,exports.lin_P3=lin_P3,exports.lin_P3_to_XYZ=lin_P3_to_XYZ,exports.lin_sRGB=lin_sRGB,exports.lin_sRGB_to_XYZ=lin_sRGB_to_XYZ,exports.lin_sRGB_to_XYZ_D50=function lin_sRGB_to_XYZ_D50(t){let _=t;return _=lin_sRGB_to_XYZ(_),_=D65_to_D50(_),_},exports.mapGamut=function mapGamut(t,e,n){const r=t;let a=clip(e(r)),i=deltaEOK(OKLCH_to_OKLab(n(a)),OKLCH_to_OKLab(r));if(i<_)return a;let l=0,u=r[1],s=!0;for(;u-l>o;){const t=(l+u)/2;if(r[1]=t,s&&inGamut(e(r)))l=t;else if(a=clip(e(r)),i=deltaEOK(OKLCH_to_OKLab(n(a)),OKLCH_to_OKLab(r)),i<_){if(_-i1e-5;){const t=(e+r)/2;o[1]=t;const a=_(o);if(inGamut(a)){e=t;continue}const i=clip(a);if(deltaEOK(OKLCH_to_OKLab(n(i)),OKLCH_to_OKLab(o))<.02)return i;r=t}return clip(_([...o]))}const _={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function luminance(t){const[_,n,o]=t.map((t=>t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)));return.2126*_+.7152*n+.0722*o}function contrast_ratio_wcag_2_1(t,_){const n=luminance(t),o=luminance(_);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}export{HSL_to_XYZ_D50,HWB_to_XYZ_D50,LCH_to_XYZ_D50,Lab_to_XYZ_D50,OKLCH_to_OKLab,OKLCH_to_XYZ_D50,OKLab_to_OKLCH,OKLab_to_XYZ,OKLab_to_XYZ_D50,P3_to_XYZ_D50,ProPhoto_RGB_to_XYZ_D50,XYZ_D50_to_HSL,XYZ_D50_to_HWB,XYZ_D50_to_LCH,XYZ_D50_to_Lab,XYZ_D50_to_OKLCH,XYZ_D50_to_OKLab,XYZ_D50_to_P3,XYZ_D50_to_ProPhoto,XYZ_D50_to_XYZ_D50,XYZ_D50_to_XYZ_D65,XYZ_D50_to_a98_RGB,XYZ_D50_to_lin_sRGB,XYZ_D50_to_rec_2020,XYZ_D50_to_sRGB,XYZ_D65_to_XYZ_D50,XYZ_to_OKLab,XYZ_to_lin_P3,XYZ_to_lin_sRGB,a98_RGB_to_XYZ_D50,clip,contrast_ratio_wcag_2_1,gam_P3,gam_sRGB,inGamut,lin_P3,lin_P3_to_XYZ,lin_sRGB,lin_sRGB_to_XYZ,lin_sRGB_to_XYZ_D50,mapGamut,_ as namedColors,rec_2020_to_XYZ_D50,sRGB_to_XYZ_D50}; + */function deltaEOK(t,_){const[n,o,e]=t,[r,a,i]=_,l=n-r,u=o-a,c=e-i;return Math.sqrt(l**2+u**2+c**2)}const _=.02,n=1e-4;function mapGamut(t,o,e){const r=t;let a=clip(o(r)),i=deltaEOK(OKLCH_to_OKLab(e(a)),OKLCH_to_OKLab(r));if(i<_)return a;let l=0,u=r[1],c=!0;for(;u-l>n;){const t=(l+u)/2;if(r[1]=t,c&&inGamut(o(r)))l=t;else if(a=clip(o(r)),i=deltaEOK(OKLCH_to_OKLab(e(a)),OKLCH_to_OKLab(r)),i<_){if(_-it<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)));return.2126*_+.7152*n+.0722*o}function contrast_ratio_wcag_2_1(t,_){const n=luminance(t),o=luminance(_);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}export{HSL_to_XYZ_D50,HWB_to_XYZ_D50,LCH_to_XYZ_D50,Lab_to_XYZ_D50,OKLCH_to_OKLab,OKLCH_to_XYZ_D50,OKLab_to_OKLCH,OKLab_to_XYZ,OKLab_to_XYZ_D50,P3_to_XYZ_D50,ProPhoto_RGB_to_XYZ_D50,XYZ_D50_to_HSL,XYZ_D50_to_HWB,XYZ_D50_to_LCH,XYZ_D50_to_Lab,XYZ_D50_to_OKLCH,XYZ_D50_to_OKLab,XYZ_D50_to_P3,XYZ_D50_to_ProPhoto,XYZ_D50_to_XYZ_D50,XYZ_D50_to_XYZ_D65,XYZ_D50_to_a98_RGB,XYZ_D50_to_lin_sRGB,XYZ_D50_to_rec_2020,XYZ_D50_to_sRGB,XYZ_D65_to_XYZ_D50,XYZ_to_OKLab,XYZ_to_lin_P3,XYZ_to_lin_sRGB,a98_RGB_to_XYZ_D50,clip,contrast_ratio_wcag_2_1,gam_P3,gam_sRGB,inGamut,lin_P3,lin_P3_to_XYZ,lin_sRGB,lin_sRGB_to_XYZ,lin_sRGB_to_XYZ_D50,mapGamut,o as namedColors,rec_2020_to_XYZ_D50,sRGB_to_XYZ_D50}; diff --git a/packages/color-helpers/src/calculations/map-gamut.ts b/packages/color-helpers/src/calculations/map-gamut.ts index 0c067743c..b3db0e246 100644 --- a/packages/color-helpers/src/calculations/map-gamut.ts +++ b/packages/color-helpers/src/calculations/map-gamut.ts @@ -5,7 +5,7 @@ import type { Color } from '../types/color'; import { inGamut } from '../utils/in-gamut'; const JND = 0.02; -const EPSILON = 0.00001; +const EPSILON = 0.0001; export function mapGamut( startOKLCH: Color, @@ -13,29 +13,65 @@ export function mapGamut( fromDestination: (x: Color) => Color, ): Color { + // 11. set current to origin_Oklch const current = startOKLCH; + // 12. set clipped to clip(current) + let clipped = clip(toDestination(current)); + + // 13. set E to delta(clipped, current) + let E = deltaEOK(OKLCH_to_OKLab(fromDestination(clipped)), OKLCH_to_OKLab(current)); + + // 14. if E < JND + if (E < JND) { + // 14.1. return clipped as the gamut mapped color + return clipped; + } + + // 15. set min to zero let min = 0.0; + // 16. set max to the Oklch chroma of origin_Oklch let max = current[1]; + // 17. let min_inGamut be a boolean that represents when min is still in gamut, and set it to true + let min_inGamut = true; + // 18. while (max - min is greater than epsilon) repeat the following steps while ((max - min) > EPSILON) { + // 18.1. set chroma to (min + max) / 2 const chroma = (min + max) / 2.0; + // 18.2. set the chroma component of current to chroma current[1] = chroma; - - const converted = toDestination(current); - if (inGamut(converted)) { + // 18.3. if min_inGamut is true and also if inGamut(current) is true, set min to chroma and continue to repeat these steps + if (min_inGamut && inGamut(toDestination(current))) { min = chroma; continue; } - const clipped = clip(converted); - const delta_e = deltaEOK(OKLCH_to_OKLab(fromDestination(clipped)), OKLCH_to_OKLab(current)); - if (delta_e < JND) { - return clipped; + // 18.4. otherwise, if inGamut(current) is false carry out these steps: + // 18.4.1. set clipped to clip(current) + clipped = clip(toDestination(current)); + // 18.4.2. set E to delta(clipped, current) + E = deltaEOK(OKLCH_to_OKLab(fromDestination(clipped)), OKLCH_to_OKLab(current)); + + // 18.4.3. if E < JND + if (E < JND) { + // 18.4.3.1 if (JND - E < epsilon) return clipped as the gamut mapped color + if ((JND - E) < EPSILON) { + return clipped; + } + + // 18.4.3.2 otherwise, + // 18.4.3.2.1 set min_inGamut to false + min_inGamut = false; + // 18.4.3.2.2 set min to chroma + min = chroma; + continue; } + // 18.4.4. otherwise, set max to chroma and continue to repeat these steps max = chroma; } + // 19. return clipped as the gamut mapped color return clip(toDestination([...current])); } diff --git a/packages/css-color-parser/test/basic/color-function.mjs b/packages/css-color-parser/test/basic/color-function.mjs index 2f2b1f26d..45bcd4e12 100644 --- a/packages/css-color-parser/test/basic/color-function.mjs +++ b/packages/css-color-parser/test/basic/color-function.mjs @@ -13,25 +13,25 @@ const tests = [ ['color(a98-rgb 0.7 0.5 0.3)', 'rgb(196, 129, 72)'], ['color(prophoto-rgb 0.7 0.5 0.3)', 'rgb(234, 133, 82)'], - ['color(srgb 0.0005556487875468122 0.9999999999999999 -0.00220276712790066)', 'rgb(1, 255, 0)'], - ['color(srgb-linear 0.000043006872101146454 0.9999999999999999 -0.00017049281175701703)', 'rgb(1, 255, 0)'], - ['color(a98-rgb 0.565 1 0.234)', 'rgb(1, 255, 0)'], - ['color(prophoto-rgb 0.5402796954751572 0.9275945561561767 0.30435477084804174)', 'rgb(1, 255, 0)'], - ['color(display-p3 0.45844420720487417 0.9852652233445233 0.29798036139719497)', 'rgb(1, 255, 0)'], - ['color(rec2020 0.5675603321833232 0.9592792129938423 0.2686829491074993)', 'rgb(1, 255, 0)'], - ['color(xyz-d50 0.3851458288094242 0.7168862873215868 0.09696013568183873)', 'rgb(1, 255, 0)'], - ['color(xyz-d65 0.35757130434515494 0.7151655154354521 0.11903355225337156)', 'rgb(1, 255, 0)'], - ['color(xyz 0.35757130434515494 0.7151655154354521 0.11903355225337156)', 'rgb(1, 255, 0)'], + ['color(srgb 0.0005556487875468122 0.9999999999999999 -0.00220276712790066)', 'rgb(0, 255, 0)'], + ['color(srgb-linear 0.000043006872101146454 0.9999999999999999 -0.00017049281175701703)', 'rgb(0, 255, 0)'], + ['color(a98-rgb 0.565 1 0.234)', 'rgb(0, 255, 0)'], + ['color(prophoto-rgb 0.5402796954751572 0.9275945561561767 0.30435477084804174)', 'rgb(0, 255, 0)'], + ['color(display-p3 0.45844420720487417 0.9852652233445233 0.29798036139719497)', 'rgb(0, 255, 0)'], + ['color(rec2020 0.5675603321833232 0.9592792129938423 0.2686829491074993)', 'rgb(0, 255, 0)'], + ['color(xyz-d50 0.3851458288094242 0.7168862873215868 0.09696013568183873)', 'rgb(0, 255, 0)'], + ['color(xyz-d65 0.35757130434515494 0.7151655154354521 0.11903355225337156)', 'rgb(0, 255, 0)'], + ['color(xyz 0.35757130434515494 0.7151655154354521 0.11903355225337156)', 'rgb(0, 255, 0)'], - ['color(srgb -0.13610556145124594 0.5177053690420603 0.540031109817831)', 'rgb(0, 131, 136)'], - ['color(srgb-linear -0.01656723676661187 0.23079644121427306 0.25298181882824156)', 'rgb(0, 131, 136)'], - ['color(a98-rgb 0.265 0.5134 0.5344)', 'rgb(0, 131, 136)'], - ['color(prophoto-rgb 0.28284813138491105 0.41695332740189284 0.4586239337463392)', 'rgb(0, 131, 136)'], - ['color(display-p3 0.18049383596973329 0.5091259470889726 0.5339002129941044)', 'rgb(0, 131, 136)'], - ['color(rec2020 0.24657637908526203 0.44994210472189566 0.486194553499425)', 'rgb(0, 131, 136)'], - ['color(xyz-d50 0.11786343156307554 0.1771045882551784 0.2028294891298204)', 'rgb(0, 131, 136)'], - ['color(xyz-d65 0.12135537506539545 0.1797988884168019 0.2676568254682071)', 'rgb(0, 131, 136)'], - ['color(xyz 0.12135537506539545 0.1797988884168019 0.2676568254682071)', 'rgb(0, 131, 136)'], + ['color(srgb -0.13610556145124594 0.5177053690420603 0.540031109817831)', 'rgb(0, 132, 138)'], + ['color(srgb-linear -0.01656723676661187 0.23079644121427306 0.25298181882824156)', 'rgb(0, 132, 138)'], + ['color(a98-rgb 0.265 0.5134 0.5344)', 'rgb(0, 132, 138)'], + ['color(prophoto-rgb 0.28284813138491105 0.41695332740189284 0.4586239337463392)', 'rgb(0, 132, 138)'], + ['color(display-p3 0.18049383596973329 0.5091259470889726 0.5339002129941044)', 'rgb(0, 132, 138)'], + ['color(rec2020 0.24657637908526203 0.44994210472189566 0.486194553499425)', 'rgb(0, 132, 138)'], + ['color(xyz-d50 0.11786343156307554 0.1771045882551784 0.2028294891298204)', 'rgb(0, 132, 138)'], + ['color(xyz-d65 0.12135537506539545 0.1797988884168019 0.2676568254682071)', 'rgb(0, 132, 138)'], + ['color(xyz 0.12135537506539545 0.1797988884168019 0.2676568254682071)', 'rgb(0, 132, 138)'], ['color(srgb 0.8978862558205767 0.4885001647805462 0.9594359763905097)', 'rgb(229, 125, 245)'], ['color(srgb-linear 0.7832360124544266 0.2035510416163499 0.9101924728483531)', 'rgb(229, 125, 245)'], diff --git a/packages/css-color-parser/test/basic/color-mix-function.mjs b/packages/css-color-parser/test/basic/color-mix-function.mjs index bf816a184..f8a1882a7 100644 --- a/packages/css-color-parser/test/basic/color-mix-function.mjs +++ b/packages/css-color-parser/test/basic/color-mix-function.mjs @@ -53,17 +53,17 @@ const tests = [ ['color-mix(in hsl, green 40%, oklch(0.747 0.196 322.2))', 'rgb(28, 89, 245)'], ['color-mix(in hsl, green 40%, hsl(292deg 85.71% 72.55%))', 'rgb(28, 89, 245)'], - ['color-mix(in oklch, green 40%, color(srgb 0.8978862558205767 0.4885001647805462 0.9594359763905097))', 'rgb(0, 148, 253)'], - ['color-mix(in oklch, green 40%, color(srgb-linear 0.7832360124544266 0.2035510416163499 0.9101924728483531))', 'rgb(0, 148, 253)'], - ['color-mix(in oklch, green 40%, color(a98-rgb 0.8035122804301492 0.484896415622613 0.9440692746539695))', 'rgb(0, 148, 253)'], - ['color-mix(in oklch, green 40%, color(prophoto-rgb 0.7596595159204217 0.4934889951894072 0.8985832663171222))', 'rgb(0, 148, 253)'], - ['color-mix(in oklch, green 40%, color(display-p3 0.843565234 0.509345345 0.9342344435))', 'rgb(0, 148, 253)'], - ['color-mix(in oklch, green 40%, color(rec2020 0.7728366085950608 0.49153213847089583 0.9202627474826224))', 'rgb(0, 148, 253)'], - ['color-mix(in oklch, green 40%, color(xyz-d50 0.5501693084815327 0.37536346388820246 0.6806345611398199))', 'rgb(0, 148, 253)'], - ['color-mix(in oklch, green 40%, color(xyz-d65 0.5600582450343325 0.37782875858447507 0.904570025128693))', 'rgb(0, 148, 253)'], - ['color-mix(in oklch, green 40%, color(xyz 0.5600582450343325 0.37782875858447507 0.904570025128693))', 'rgb(0, 148, 253)'], + ['color-mix(in oklch, green 40%, color(srgb 0.8978862558205767 0.4885001647805462 0.9594359763905097))', 'rgb(0, 148, 254)'], + ['color-mix(in oklch, green 40%, color(srgb-linear 0.7832360124544266 0.2035510416163499 0.9101924728483531))', 'rgb(0, 148, 254)'], + ['color-mix(in oklch, green 40%, color(a98-rgb 0.8035122804301492 0.484896415622613 0.9440692746539695))', 'rgb(0, 148, 254)'], + ['color-mix(in oklch, green 40%, color(prophoto-rgb 0.7596595159204217 0.4934889951894072 0.8985832663171222))', 'rgb(0, 148, 254)'], + ['color-mix(in oklch, green 40%, color(display-p3 0.843565234 0.509345345 0.9342344435))', 'rgb(0, 148, 254)'], + ['color-mix(in oklch, green 40%, color(rec2020 0.7728366085950608 0.49153213847089583 0.9202627474826224))', 'rgb(0, 148, 254)'], + ['color-mix(in oklch, green 40%, color(xyz-d50 0.5501693084815327 0.37536346388820246 0.6806345611398199))', 'rgb(0, 148, 254)'], + ['color-mix(in oklch, green 40%, color(xyz-d65 0.5600582450343325 0.37782875858447507 0.904570025128693))', 'rgb(0, 148, 254)'], + ['color-mix(in oklch, green 40%, color(xyz 0.5600582450343325 0.37782875858447507 0.904570025128693))', 'rgb(0, 148, 254)'], ['color-mix(in oklch, green 40%, oklch(0.747 0.196 322.2))', 'rgb(0, 148, 254)'], - ['color-mix(in oklch, green 40%, hsl(292deg 85.71% 72.55%))', 'rgb(0, 148, 253)'], + ['color-mix(in oklch, green 40%, hsl(292deg 85.71% 72.55%))', 'rgb(0, 148, 254)'], ['color-mix(in srgb, color(xyz 1 none 0) 30%, rgb(none 255 128))', 'rgb(255, 255, 255)'], diff --git a/packages/css-color-parser/test/basic/lab.mjs b/packages/css-color-parser/test/basic/lab.mjs index b58a1ddc0..2c9381415 100644 --- a/packages/css-color-parser/test/basic/lab.mjs +++ b/packages/css-color-parser/test/basic/lab.mjs @@ -40,7 +40,7 @@ assert.deepStrictEqual( assert.deepStrictEqual( serialize_sRGB_data(color(parse('lab(86.6146% -106.5599 102.8717)'))), - 'rgb(0, 249, 66)', + 'rgb(0, 251, 41)', ); assert.deepStrictEqual( diff --git a/packages/css-color-parser/test/basic/lch.mjs b/packages/css-color-parser/test/basic/lch.mjs index d33b855cb..75ae822ae 100644 --- a/packages/css-color-parser/test/basic/lch.mjs +++ b/packages/css-color-parser/test/basic/lch.mjs @@ -11,7 +11,7 @@ const tests = [ ['lch(70% 45 -180)', 'rgb(27, 193, 169)', 'color(display-p3 0.35511 0.7445 0.66623)'], ['lch(70% 70 90)', 'rgb(195, 169, 14)', 'color(display-p3 0.74935 0.66735 0.2273)'], ['lch(55% 60 270)', 'rgb(33, 135, 237)', 'color(display-p3 0.26152 0.52336 0.89912)'], - ['lch(86.6146% 148.1135 136.0089)', 'rgb(0, 249, 66)', 'color(display-p3 0 1 0.00064)'], + ['lch(86.6146% 148.1135 136.0089)', 'rgb(0, 251, 41)', 'color(display-p3 0 1 0)'], ]; for (const test of tests) { diff --git a/packages/css-color-parser/test/basic/relative-color.mjs b/packages/css-color-parser/test/basic/relative-color.mjs index 065d37643..2f7963b7a 100644 --- a/packages/css-color-parser/test/basic/relative-color.mjs +++ b/packages/css-color-parser/test/basic/relative-color.mjs @@ -107,96 +107,96 @@ assert.deepStrictEqual( [ ['color(from color(srgb 0 1 0) srgb r g b)', 'rgb(0, 255, 0)'], ['color(from color(srgb-linear 0 1 0) srgb r g b)', 'rgb(0, 255, 0)'], - ['color(from color(display-p3 0 1 0) srgb r g b)', 'rgb(0, 249, 66)'], + ['color(from color(display-p3 0 1 0) srgb r g b)', 'rgb(0, 251, 41)'], ['color(from color(a98-rgb 0 1 0) srgb r g b)', 'rgb(0, 236, 104)'], - ['color(from color(prophoto-rgb 0 1 0) srgb r g b)', 'rgb(0, 243, 124)'], - ['color(from color(rec2020 0 1 0) srgb r g b)', 'rgb(0, 240, 119)'], + ['color(from color(prophoto-rgb 0 1 0) srgb r g b)', 'rgb(0, 245, 117)'], + ['color(from color(rec2020 0 1 0) srgb r g b)', 'rgb(0, 242, 114)'], ['color(from color(srgb 0 1 0) srgb-linear r g b)', 'rgb(0, 255, 0)'], ['color(from color(srgb-linear 0 1 0) srgb-linear r g b)', 'rgb(0, 255, 0)'], - ['color(from color(display-p3 0 1 0) srgb-linear r g b)', 'rgb(0, 249, 66)'], + ['color(from color(display-p3 0 1 0) srgb-linear r g b)', 'rgb(0, 251, 41)'], ['color(from color(a98-rgb 0 1 0) srgb-linear r g b)', 'rgb(0, 236, 104)'], - ['color(from color(prophoto-rgb 0 1 0) srgb-linear r g b)', 'rgb(0, 243, 124)'], - ['color(from color(rec2020 0 1 0) srgb-linear r g b)', 'rgb(0, 240, 119)'], + ['color(from color(prophoto-rgb 0 1 0) srgb-linear r g b)', 'rgb(0, 245, 117)'], + ['color(from color(rec2020 0 1 0) srgb-linear r g b)', 'rgb(0, 242, 114)'], ['color(from color(srgb 0 1 0) display-p3 r g b)', 'rgb(0, 255, 0)'], ['color(from color(srgb-linear 0 1 0) display-p3 r g b)', 'rgb(0, 255, 0)'], - ['color(from color(display-p3 0 1 0) display-p3 r g b)', 'rgb(0, 249, 66)'], + ['color(from color(display-p3 0 1 0) display-p3 r g b)', 'rgb(0, 251, 41)'], ['color(from color(a98-rgb 0 1 0) display-p3 r g b)', 'rgb(0, 236, 104)'], - ['color(from color(prophoto-rgb 0 1 0) display-p3 r g b)', 'rgb(0, 243, 124)'], - ['color(from color(rec2020 0 1 0) display-p3 r g b)', 'rgb(0, 240, 119)'], + ['color(from color(prophoto-rgb 0 1 0) display-p3 r g b)', 'rgb(0, 245, 117)'], + ['color(from color(rec2020 0 1 0) display-p3 r g b)', 'rgb(0, 242, 114)'], ['color(from color(srgb 0 1 0) a98-rgb r g b)', 'rgb(0, 255, 0)'], ['color(from color(srgb-linear 0 1 0) a98-rgb r g b)', 'rgb(0, 255, 0)'], - ['color(from color(display-p3 0 1 0) a98-rgb r g b)', 'rgb(0, 249, 66)'], + ['color(from color(display-p3 0 1 0) a98-rgb r g b)', 'rgb(0, 251, 41)'], ['color(from color(a98-rgb 0 1 0) a98-rgb r g b)', 'rgb(0, 236, 104)'], - ['color(from color(prophoto-rgb 0 1 0) a98-rgb r g b)', 'rgb(0, 243, 124)'], - ['color(from color(rec2020 0 1 0) a98-rgb r g b)', 'rgb(0, 240, 119)'], + ['color(from color(prophoto-rgb 0 1 0) a98-rgb r g b)', 'rgb(0, 245, 117)'], + ['color(from color(rec2020 0 1 0) a98-rgb r g b)', 'rgb(0, 242, 114)'], ['color(from color(srgb 0 1 0) prophoto-rgb r g b)', 'rgb(0, 255, 0)'], ['color(from color(srgb-linear 0 1 0) prophoto-rgb r g b)', 'rgb(0, 255, 0)'], - ['color(from color(display-p3 0 1 0) prophoto-rgb r g b)', 'rgb(0, 249, 66)'], + ['color(from color(display-p3 0 1 0) prophoto-rgb r g b)', 'rgb(0, 251, 41)'], ['color(from color(a98-rgb 0 1 0) prophoto-rgb r g b)', 'rgb(0, 236, 104)'], - ['color(from color(prophoto-rgb 0 1 0) prophoto-rgb r g b)', 'rgb(0, 243, 124)'], - ['color(from color(rec2020 0 1 0) prophoto-rgb r g b)', 'rgb(0, 240, 119)'], + ['color(from color(prophoto-rgb 0 1 0) prophoto-rgb r g b)', 'rgb(0, 245, 117)'], + ['color(from color(rec2020 0 1 0) prophoto-rgb r g b)', 'rgb(0, 242, 114)'], ['color(from color(srgb 0 1 0) rec2020 r g b)', 'rgb(0, 255, 0)'], ['color(from color(srgb-linear 0 1 0) rec2020 r g b)', 'rgb(0, 255, 0)'], - ['color(from color(display-p3 0 1 0) rec2020 r g b)', 'rgb(0, 249, 66)'], + ['color(from color(display-p3 0 1 0) rec2020 r g b)', 'rgb(0, 251, 41)'], ['color(from color(a98-rgb 0 1 0) rec2020 r g b)', 'rgb(0, 236, 104)'], - ['color(from color(prophoto-rgb 0 1 0) rec2020 r g b)', 'rgb(0, 243, 124)'], - ['color(from color(rec2020 0 1 0) rec2020 r g b)', 'rgb(0, 240, 119)'], + ['color(from color(prophoto-rgb 0 1 0) rec2020 r g b)', 'rgb(0, 245, 117)'], + ['color(from color(rec2020 0 1 0) rec2020 r g b)', 'rgb(0, 242, 114)'], // None : 1 ['color(from color(srgb 0 1 none) srgb r g b)', 'rgb(0, 255, 0)'], ['color(from color(srgb-linear 0 1 none) srgb r g b)', 'rgb(0, 255, 0)'], - ['color(from color(display-p3 0 1 none) srgb r g b)', 'rgb(0, 249, 99)'], - ['color(from color(a98-rgb 0 1 none) srgb r g b)', 'rgb(0, 236, 116)'], - ['color(from color(prophoto-rgb 0 1 none) srgb r g b)', 'rgb(0, 243, 151)'], - ['color(from color(rec2020 0 1 none) srgb r g b)', 'rgb(0, 240, 139)'], + ['color(from color(display-p3 0 1 none) srgb r g b)', 'rgb(0, 252, 86)'], + ['color(from color(a98-rgb 0 1 none) srgb r g b)', 'rgb(0, 236, 115)'], + ['color(from color(prophoto-rgb 0 1 none) srgb r g b)', 'rgb(0, 246, 145)'], + ['color(from color(rec2020 0 1 none) srgb r g b)', 'rgb(0, 242, 134)'], ['color(from color(srgb 0 1 none) srgb-linear r g b)', 'rgb(0, 255, 0)'], ['color(from color(srgb-linear 0 1 none) srgb-linear r g b)', 'rgb(0, 255, 0)'], - ['color(from color(display-p3 0 1 none) srgb-linear r g b)', 'rgb(0, 249, 99)'], - ['color(from color(a98-rgb 0 1 none) srgb-linear r g b)', 'rgb(0, 236, 116)'], - ['color(from color(prophoto-rgb 0 1 none) srgb-linear r g b)', 'rgb(0, 243, 151)'], - ['color(from color(rec2020 0 1 none) srgb-linear r g b)', 'rgb(0, 240, 139)'], - - ['color(from color(srgb 0 1 none) display-p3 r g b)', 'rgb(77, 251, 0)'], - ['color(from color(srgb-linear 0 1 none) display-p3 r g b)', 'rgb(77, 251, 0)'], - ['color(from color(display-p3 0 1 none) display-p3 r g b)', 'rgb(0, 249, 66)'], - ['color(from color(a98-rgb 0 1 none) display-p3 r g b)', 'rgb(0, 233, 108)'], - ['color(from color(prophoto-rgb 0 1 none) display-p3 r g b)', 'rgb(0, 243, 137)'], - ['color(from color(rec2020 0 1 none) display-p3 r g b)', 'rgb(0, 240, 123)'], - - ['color(from color(srgb 0 1 none) a98-rgb r g b)', 'rgb(54, 253, 0)'], - ['color(from color(srgb-linear 0 1 none) a98-rgb r g b)', 'rgb(54, 253, 0)'], - ['color(from color(display-p3 0 1 none) a98-rgb r g b)', 'rgb(0, 249, 83)'], + ['color(from color(display-p3 0 1 none) srgb-linear r g b)', 'rgb(0, 252, 86)'], + ['color(from color(a98-rgb 0 1 none) srgb-linear r g b)', 'rgb(0, 236, 115)'], + ['color(from color(prophoto-rgb 0 1 none) srgb-linear r g b)', 'rgb(0, 246, 145)'], + ['color(from color(rec2020 0 1 none) srgb-linear r g b)', 'rgb(0, 242, 134)'], + + ['color(from color(srgb 0 1 none) display-p3 r g b)', 'rgb(53, 253, 0)'], + ['color(from color(srgb-linear 0 1 none) display-p3 r g b)', 'rgb(53, 253, 0)'], + ['color(from color(display-p3 0 1 none) display-p3 r g b)', 'rgb(0, 251, 41)'], + ['color(from color(a98-rgb 0 1 none) display-p3 r g b)', 'rgb(0, 236, 95)'], + ['color(from color(prophoto-rgb 0 1 none) display-p3 r g b)', 'rgb(0, 246, 131)'], + ['color(from color(rec2020 0 1 none) display-p3 r g b)', 'rgb(0, 242, 119)'], + + ['color(from color(srgb 0 1 none) a98-rgb r g b)', 'rgb(0, 255, 0)'], + ['color(from color(srgb-linear 0 1 none) a98-rgb r g b)', 'rgb(0, 255, 0)'], + ['color(from color(display-p3 0 1 none) a98-rgb r g b)', 'rgb(0, 251, 65)'], ['color(from color(a98-rgb 0 1 none) a98-rgb r g b)', 'rgb(0, 236, 104)'], - ['color(from color(prophoto-rgb 0 1 none) a98-rgb r g b)', 'rgb(0, 243, 143)'], - ['color(from color(rec2020 0 1 none) a98-rgb r g b)', 'rgb(0, 240, 130)'], + ['color(from color(prophoto-rgb 0 1 none) a98-rgb r g b)', 'rgb(0, 246, 136)'], + ['color(from color(rec2020 0 1 none) a98-rgb r g b)', 'rgb(0, 242, 125)'], // None : 2 ['color(from color(srgb 0 1 0) srgb r g none)', 'rgb(0, 255, 0)'], ['color(from color(srgb-linear 0 1 0) srgb r g none)', 'rgb(0, 255, 0)'], - ['color(from color(display-p3 0 1 0) srgb r g none)', 'rgb(0, 249, 99)'], - ['color(from color(a98-rgb 0 1 0) srgb r g none)', 'rgb(0, 236, 116)'], - ['color(from color(prophoto-rgb 0 1 0) srgb r g none)', 'rgb(0, 243, 151)'], - ['color(from color(rec2020 0 1 0) srgb r g none)', 'rgb(0, 240, 139)'], + ['color(from color(display-p3 0 1 0) srgb r g none)', 'rgb(0, 252, 86)'], + ['color(from color(a98-rgb 0 1 0) srgb r g none)', 'rgb(0, 236, 115)'], + ['color(from color(prophoto-rgb 0 1 0) srgb r g none)', 'rgb(0, 246, 145)'], + ['color(from color(rec2020 0 1 0) srgb r g none)', 'rgb(0, 242, 134)'], ['color(from color(srgb 0 1 0) srgb-linear r g none)', 'rgb(0, 255, 0)'], ['color(from color(srgb-linear 0 1 0) srgb-linear r g none)', 'rgb(0, 255, 0)'], - ['color(from color(display-p3 0 1 0) srgb-linear r g none)', 'rgb(0, 249, 99)'], - ['color(from color(a98-rgb 0 1 0) srgb-linear r g none)', 'rgb(0, 236, 116)'], - ['color(from color(prophoto-rgb 0 1 0) srgb-linear r g none)', 'rgb(0, 243, 151)'], - ['color(from color(rec2020 0 1 0) srgb-linear r g none)', 'rgb(0, 240, 139)'], - - ['color(from color(srgb 0 1 0) display-p3 r g none)', 'rgb(77, 251, 0)'], - ['color(from color(srgb-linear 0 1 0) display-p3 r g none)', 'rgb(77, 251, 0)'], - ['color(from color(display-p3 0 1 0) display-p3 r g none)', 'rgb(0, 249, 66)'], - ['color(from color(a98-rgb 0 1 0) display-p3 r g none)', 'rgb(0, 233, 108)'], - ['color(from color(prophoto-rgb 0 1 0) display-p3 r g none)', 'rgb(0, 243, 137)'], - ['color(from color(rec2020 0 1 0) display-p3 r g none)', 'rgb(0, 240, 123)'], + ['color(from color(display-p3 0 1 0) srgb-linear r g none)', 'rgb(0, 252, 86)'], + ['color(from color(a98-rgb 0 1 0) srgb-linear r g none)', 'rgb(0, 236, 115)'], + ['color(from color(prophoto-rgb 0 1 0) srgb-linear r g none)', 'rgb(0, 246, 145)'], + ['color(from color(rec2020 0 1 0) srgb-linear r g none)', 'rgb(0, 242, 134)'], + + ['color(from color(srgb 0 1 0) display-p3 r g none)', 'rgb(53, 253, 0)'], + ['color(from color(srgb-linear 0 1 0) display-p3 r g none)', 'rgb(53, 253, 0)'], + ['color(from color(display-p3 0 1 0) display-p3 r g none)', 'rgb(0, 251, 41)'], + ['color(from color(a98-rgb 0 1 0) display-p3 r g none)', 'rgb(0, 236, 95)'], + ['color(from color(prophoto-rgb 0 1 0) display-p3 r g none)', 'rgb(0, 246, 131)'], + ['color(from color(rec2020 0 1 0) display-p3 r g none)', 'rgb(0, 242, 119)'], // clipping of components (or lack thereof) ['hsl(from lab(0 104.3 -50.9) h s l)', canonicalize('color(srgb 0.351376 -0.213938 0.299501)')], diff --git a/packages/css-color-parser/test/wpt/color-computed-lab.mjs b/packages/css-color-parser/test/wpt/color-computed-lab.mjs index 3e0d8d425..27b85cf75 100644 --- a/packages/css-color-parser/test/wpt/color-computed-lab.mjs +++ b/packages/css-color-parser/test/wpt/color-computed-lab.mjs @@ -19,8 +19,8 @@ const tests = [ ['lab(20 0 10/50%)', 'rgba(52, 48, 34, 0.5)', 'color(display-p3 0.20256 0.18882 0.13828 / 0.5)'], ['lab(400 0 10/50%)', 'rgba(255, 255, 255, 0.5)', 'color(display-p3 1 1 1 / 0.5)'], ['lab(100 0 10/50%)', 'rgba(255, 255, 255, 0.5)', 'color(display-p3 1 1 1 / 0.5)'], - ['lab(50 -160 160)', 'rgb(0, 132, 35)', 'color(display-p3 0 0.53135 0.05051)'], - ['lab(50 -200 200)', 'rgb(51, 128, 0)', 'color(display-p3 0.26 0.50158 0)'], + ['lab(50 -160 160)', 'rgb(0, 134, 17)', 'color(display-p3 0 0.53912 0)'], + ['lab(50 -200 200)', 'rgb(50, 128, 0)', 'color(display-p3 0.25706 0.50245 0)'], ['lab(0 0 0 / -10%)', 'rgba(0, 0, 0, 0)', 'color(display-p3 0 0 0 / 0)'], ['lab(0 0 0 / 110%)', 'rgb(0, 0, 0)', 'color(display-p3 0 0 0)'], ['lab(0 0 0 / 300%)', 'rgb(0, 0, 0)', 'color(display-p3 0 0 0)'], @@ -40,16 +40,16 @@ const tests = [ ['oklab(0 0 0)', 'rgb(0, 0, 0)', 'color(display-p3 0 0 0)'], ['oklab(0 0 0 / 1)', 'rgb(0, 0, 0)', 'color(display-p3 0 0 0)'], ['oklab(0 0 0 / 0.5)', 'rgba(0, 0, 0, 0.5)', 'color(display-p3 0 0 0 / 0.5)'], - ['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(0.2 0 0.1/0.5)', 'rgba(32, 20, 0, 0.5)', 'color(display-p3 0.12297 0.07776 0 / 0.5)'], + ['oklab(0.2 0 0.1/50%)', 'rgba(32, 20, 0, 0.5)', 'color(display-p3 0.12297 0.07776 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.25974 0.45977 0)'], + ['oklab(0.5 -1.6 1.6)', 'rgb(48, 118, 0)', 'color(display-p3 0.24084 0.46589 0)'], + ['oklab(0.5 -2 2)', 'rgb(48, 118, 0)', 'color(display-p3 0.24094 0.46586 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)'], ['oklab(-0.4 0 0)', 'rgb(0, 0, 0)', 'color(display-p3 0 0 0)'], - ['oklab(0.5 -0.2 0)', 'rgb(0, 117, 101)', 'color(display-p3 0 0.46541 0.40143)'], + ['oklab(0.5 -0.2 0)', 'rgb(0, 119, 102)', 'color(display-p3 0 0.47529 0.40339)'], ['oklab(0.5 0 -0.2)', 'rgb(59, 81, 211)', 'color(display-p3 0.24856 0.31486 0.7965)'], ['oklab(calc(0.5 * 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.5 * 3) calc(0.5 + 1) calc(-1.5) / calc(-0.5 * 2))', 'rgba(0, 0, 0, 0)', 'color(display-p3 0 0 0 / 0)'], @@ -60,20 +60,20 @@ const tests = [ ['oklab(none none none / 0.5)', 'rgba(0, 0, 0, 0.5)', 'color(display-p3 0 0 0 / 0.5)'], ['oklab(0 0 0 / none)', 'rgba(0, 0, 0, 0)', 'color(display-p3 0 0 0 / 0)'], - ['lab(20 -62.5 112.5 / 0.5)', 'rgba(37, 49, 0, 0.5)', 'color(display-p3 0.14983 0.19329 0 / 0.5)'], - ['lab(20% -50% 90%/0.5)', 'rgba(37, 49, 0, 0.5)', 'color(display-p3 0.14983 0.19329 0 / 0.5)'], - ['oklab(0.2 0.28 -0.32 / 0.5)', 'rgba(37, 0, 56, 0.5)', 'color(display-p3 0.13416 0 0.22429 / 0.5)'], - ['oklab(20% 70% -80%/0.5)', 'rgba(37, 0, 56, 0.5)', 'color(display-p3 0.13416 0 0.22429 / 0.5)'], + ['lab(20 -62.5 112.5 / 0.5)', 'rgba(35, 50, 0, 0.5)', 'color(display-p3 0.14667 0.19584 0 / 0.5)'], + ['lab(20% -50% 90%/0.5)', 'rgba(35, 50, 0, 0.5)', 'color(display-p3 0.14667 0.19584 0 / 0.5)'], + ['oklab(0.2 0.28 -0.32 / 0.5)', 'rgba(39, 0, 61, 0.5)', 'color(display-p3 0.13794 0 0.23517 / 0.5)'], + ['oklab(20% 70% -80%/0.5)', 'rgba(39, 0, 61, 0.5)', 'color(display-p3 0.13794 0 0.23517 / 0.5)'], ['lch(0 0 0deg)', 'rgb(0, 0, 0)', 'color(display-p3 0 0 0)'], ['lch(0 0 0deg / 1)', 'rgb(0, 0, 0)', 'color(display-p3 0 0 0)'], ['lch(0 0 0deg / 0.5)', 'rgba(0, 0, 0, 0.5)', 'color(display-p3 0 0 0 / 0.5)'], ['lch(100 230 0deg / 0.5)', 'rgba(255, 255, 255, 0.5)', 'color(display-p3 1 1 1 / 0.5)'], - ['lch(20 50 20deg/0.5)', 'rgba(104, 0, 29, 0.5)', 'color(display-p3 0.38092 0.00312 0.11269 / 0.5)'], - ['lch(20 50 20deg/50%)', 'rgba(104, 0, 29, 0.5)', 'color(display-p3 0.38092 0.00312 0.11269 / 0.5)'], + ['lch(20 50 20deg/0.5)', 'rgba(107, 0, 27, 0.5)', 'color(display-p3 0.38092 0.00312 0.11269 / 0.5)'], + ['lch(20 50 20deg/50%)', 'rgba(107, 0, 27, 0.5)', 'color(display-p3 0.38092 0.00312 0.11269 / 0.5)'], ['lch(10 20 20deg / -10%)', 'rgba(51, 15, 19, 0)', 'color(display-p3 0.18359 0.06826 0.0765 / 0)'], ['lch(10 20 20deg / 110%)', 'rgb(51, 15, 19)', 'color(display-p3 0.18359 0.06826 0.0765)'], - ['lch(10 20 1.28rad)', 'rgb(37, 25, 0)', 'color(display-p3 0.14474 0.09967 0)'], + ['lch(10 20 1.28rad)', 'rgb(40, 24, 0)', 'color(display-p3 0.14986 0.09736 0)'], ['lch(10 20 380deg)', 'rgb(51, 15, 19)', 'color(display-p3 0.18359 0.06826 0.0765)'], ['lch(10 20 -340deg)', 'rgb(51, 15, 19)', 'color(display-p3 0.18359 0.06826 0.0765)'], ['lch(10 20 740deg)', 'rgb(51, 15, 19)', 'color(display-p3 0.18359 0.06826 0.0765)'], @@ -96,20 +96,20 @@ const tests = [ ['oklch(0 0 0deg / 1)', 'rgb(0, 0, 0)', 'color(display-p3 0 0 0)'], ['oklch(0 0 0deg / 0.5)', 'rgba(0, 0, 0, 0.5)', 'color(display-p3 0 0 0 / 0.5)'], ['oklch(1 2.3 0deg / 0.5)', 'rgba(255, 255, 255, 0.5)', 'color(display-p3 1 1 1 / 0.5)'], - ['oklch(0.2 0.5 20deg/0.5)', 'rgba(54, 0, 4, 0.5)', 'color(display-p3 0.18813 0 0.01902 / 0.5)'], - ['oklch(0.2 0.5 20deg/50%)', 'rgba(54, 0, 4, 0.5)', 'color(display-p3 0.18813 0 0.01902 / 0.5)'], - ['oklch(0.1 0.2 20deg / -10%)', 'rgba(15, 0, 0, 0)', 'color(display-p3 0.04964 0 0.00188 / 0)'], - ['oklch(0.1 0.2 20deg / 110%)', 'rgb(15, 0, 0)', 'color(display-p3 0.04964 0 0.00188)'], - ['oklch(0.1 0.2 1.28rad)', 'rgb(7, 2, 0)', 'color(display-p3 0.02425 0.00999 0)'], - ['oklch(0.1 0.2 380deg)', 'rgb(15, 0, 0)', 'color(display-p3 0.04964 0 0.00188)'], - ['oklch(0.1 0.2 -340deg)', 'rgb(15, 0, 0)', 'color(display-p3 0.04964 0 0.00188)'], - ['oklch(0.1 0.2 740deg)', 'rgb(15, 0, 0)', 'color(display-p3 0.04964 0 0.00188)'], - ['oklch(0.1 0.2 -700deg)', 'rgb(15, 0, 0)', 'color(display-p3 0.04964 0 0.00188)'], + ['oklch(0.2 0.5 20deg/0.5)', 'rgba(55, 0, 3, 0.5)', 'color(display-p3 0.20302 0 0.00898 / 0.5)'], + ['oklch(0.2 0.5 20deg/50%)', 'rgba(55, 0, 3, 0.5)', 'color(display-p3 0.20302 0 0.00898 / 0.5)'], + ['oklch(0.1 0.2 20deg / -10%)', 'rgba(17, 0, 0, 0)', 'color(display-p3 0.06105 0 0 / 0)'], + ['oklch(0.1 0.2 20deg / 110%)', 'rgb(17, 0, 0)', 'color(display-p3 0.06105 0 0)'], + ['oklch(0.1 0.2 1.28rad)', 'rgb(10, 2, 0)', 'color(display-p3 0.03397 0.00643 0)'], + ['oklch(0.1 0.2 380deg)', 'rgb(17, 0, 0)', 'color(display-p3 0.06105 0 0)'], + ['oklch(0.1 0.2 -340deg)', 'rgb(17, 0, 0)', 'color(display-p3 0.06105 0 0)'], + ['oklch(0.1 0.2 740deg)', 'rgb(17, 0, 0)', 'color(display-p3 0.06105 0 0)'], + ['oklch(0.1 0.2 -700deg)', 'rgb(17, 0, 0)', 'color(display-p3 0.06105 0 0)'], ['oklch(-0.4 0 0)', 'rgb(0, 0, 0)', 'color(display-p3 0 0 0)'], ['oklch(0.2 -0.2 0)', 'rgb(22, 22, 22)', 'color(display-p3 0.0861 0.0861 0.0861)'], ['oklch(0 0 0 / 0.5)', 'rgba(0, 0, 0, 0.5)', 'color(display-p3 0 0 0 / 0.5)'], - ['oklch(0.1 0.2 20 / 110%)', 'rgb(15, 0, 0)', 'color(display-p3 0.04964 0 0.00188)'], - ['oklch(0.1 0.2 -700)', 'rgb(15, 0, 0)', 'color(display-p3 0.04964 0 0.00188)'], + ['oklch(0.1 0.2 20 / 110%)', 'rgb(17, 0, 0)', 'color(display-p3 0.06105 0 0)'], + ['oklch(0.1 0.2 -700)', 'rgb(17, 0, 0)', 'color(display-p3 0.06105 0 0)'], ['oklch(calc(0.5 * 3) calc(0.5 - 1) calc(20deg * 2) / calc(-0.5 + 1))', 'rgba(255, 255, 255, 0.5)', 'color(display-p3 1 1 1 / 0.5)'], ['oklch(calc(-0.5 * 3) calc(0.5 + 1) calc(-20deg * 2) / calc(-0.5 * 2))', 'rgba(0, 0, 0, 0)', 'color(display-p3 0 0 0 / 0)'], @@ -119,10 +119,10 @@ const tests = [ ['oklch(none none none / 0.5)', 'rgba(0, 0, 0, 0.5)', 'color(display-p3 0 0 0 / 0.5)'], ['oklch(0 0 0 / none)', 'rgba(0, 0, 0, 0)', 'color(display-p3 0 0 0 / 0)'], - ['lch(20 120 10 / 0.5)', 'rgba(113, 0, 49, 0.5)', 'color(display-p3 0.42656 0 0.18551 / 0.5)'], - ['lch(20% 80% 10/0.5)', 'rgba(113, 0, 49, 0.5)', 'color(display-p3 0.42656 0 0.18551 / 0.5)'], - ['oklch(0.2 0.24 10 / 0.5)', 'rgba(52, 0, 12, 0.5)', 'color(display-p3 0.19503 0 0.04399 / 0.5)'], - ['oklch(20% 60% 10/0.5)', 'rgba(52, 0, 12, 0.5)', 'color(display-p3 0.19503 0 0.04399 / 0.5)'], + ['lch(20 120 10 / 0.5)', 'rgba(118, 0, 48, 0.5)', 'color(display-p3 0.43844 0 0.18223 / 0.5)'], + ['lch(20% 80% 10/0.5)', 'rgba(118, 0, 48, 0.5)', 'color(display-p3 0.43844 0 0.18223 / 0.5)'], + ['oklch(0.2 0.24 10 / 0.5)', 'rgba(54, 0, 11, 0.5)', 'color(display-p3 0.19911 0 0.04194 / 0.5)'], + ['oklch(20% 60% 10/0.5)', 'rgba(54, 0, 11, 0.5)', 'color(display-p3 0.19911 0 0.04194 / 0.5)'], ]; for (const test of tests) { diff --git a/packages/css-color-parser/test/wpt/color-computed-oklab.mjs b/packages/css-color-parser/test/wpt/color-computed-oklab.mjs index ec284a024..71e342f16 100644 --- a/packages/css-color-parser/test/wpt/color-computed-oklab.mjs +++ b/packages/css-color-parser/test/wpt/color-computed-oklab.mjs @@ -19,19 +19,19 @@ const tests = [ ['oklab(0 0 0)', 'rgb(0, 0, 0)', 'color(display-p3 0 0 0)'], ['oklab(0 0 0 / 1)', 'rgb(0, 0, 0)', 'color(display-p3 0 0 0)'], ['oklab(0 0 0 / 0.5)', 'rgba(0, 0, 0, 0.5)', 'color(display-p3 0 0 0 / 0.5)'], - ['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(0.2 0 0.1/0.5)', 'rgba(32, 20, 0, 0.5)', 'color(display-p3 0.12297 0.07776 0 / 0.5)'], + ['oklab(0.2 0 0.1/50%)', 'rgba(32, 20, 0, 0.5)', 'color(display-p3 0.12297 0.07776 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.45977 0)'], - ['oklab(0.5 -1 1)', 'rgb(55, 117, 0)', 'color(display-p3 0.25974 0.45977 0)'], + ['oklab(0.5 -0.4 0.4)', 'rgb(48, 118, 0)', 'color(display-p3 0.24084 0.46589 0)'], + ['oklab(0.5 -1 1)', 'rgb(48, 118, 0)', 'color(display-p3 0.24094 0.46586 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)'], ['oklab(-0.4 0 0)', 'rgb(0, 0, 0)', 'color(display-p3 0 0 0)'], - ['oklab(0.5 -0.1 0)', 'rgb(0, 116, 101)', 'color(display-p3 0.1594 0.45196 0.39888)'], + ['oklab(0.5 -0.1 0)', 'rgb(0, 117, 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.06185 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.06796 0.06171 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)'], diff --git a/packages/css-color-parser/test/wpt/color-computed-relative-color.mjs b/packages/css-color-parser/test/wpt/color-computed-relative-color.mjs index 293e44932..0227e26b7 100644 --- a/packages/css-color-parser/test/wpt/color-computed-relative-color.mjs +++ b/packages/css-color-parser/test/wpt/color-computed-relative-color.mjs @@ -14,7 +14,7 @@ const tests = [ ['rgb(from rgb(from rebeccapurple r g b) r g b)', 'rgb(102, 51, 153)'], // Testing non-sRGB origin colors to see gamut mapping. - ['rgb(from color(display-p3 0 1 0) r g b / alpha)', 'rgb(0, 249, 66)'], // Naive clip based mapping would give rgb(0, 255, 0). + ['rgb(from color(display-p3 0 1 0) r g b / alpha)', 'rgb(0, 251, 41)'], // Naive clip based mapping would give rgb(0, 255, 0). ['rgb(from lab(100 104.3 -50.9) r g b)', 'rgb(255, 255, 255)'], // Naive clip based mapping would give rgb(255, 150, 255). ['rgb(from lab(0 104.3 -50.9) r g b)', 'rgb(42, 0, 34)'], // Naive clip based mapping would give rgb(90, 0, 76). NOTE: 0% lightness in Lab/LCH does not automatically correspond with sRGB black, ['rgb(from lch(100 116 334) r g b)', 'rgb(255, 255, 255)'], // Naive clip based mapping would give rgb(255, 150, 255). @@ -121,7 +121,7 @@ const tests = [ ['hsl(from hsl(from rebeccapurple h s l) h s l)', 'rgb(102, 51, 153)'], // Testing non-sRGB origin colors to see gamut mapping. - ['hsl(from color(display-p3 0 1 0) h s l / alpha)', 'rgb(0, 249, 66)'], // Naive clip based mapping would give rgb(0, 255, 0). + ['hsl(from color(display-p3 0 1 0) h s l / alpha)', 'rgb(0, 251, 41)'], // Naive clip based mapping would give rgb(0, 255, 0). ['hsl(from lab(100 104.3 -50.9) h s l)', 'rgb(255, 255, 255)'], // Naive clip based mapping would give rgb(255, 150, 255). ['hsl(from lab(0 104.3 -50.9) h s l)', 'rgb(42, 0, 34)'], // Naive clip based mapping would give rgb(90, 0, 76). NOTE: 0% lightness in Lab/LCH does not automatically correspond with sRGB black, ['hsl(from lch(100 116 334) h s l)', 'rgb(255, 255, 255)'], // Naive clip based mapping would give rgb(255, 150, 255). @@ -202,7 +202,7 @@ const tests = [ ['hwb(from hwb(from rebeccapurple h w b) h w b)', 'rgb(102, 51, 153)'], // Testing non-sRGB origin colors to see gamut mapping. - ['hwb(from color(display-p3 0 1 0) h w b / alpha)', 'rgb(0, 249, 66)'], // Naive clip based mapping would give rgb(0, 255, 0). + ['hwb(from color(display-p3 0 1 0) h w b / alpha)', 'rgb(0, 251, 41)'], // Naive clip based mapping would give rgb(0, 255, 0). ['hwb(from lab(100 104.3 -50.9) h w b)', 'rgb(255, 255, 255)'], // Naive clip based mapping would give rgb(255, 150, 255). ['hwb(from lab(0 104.3 -50.9) h w b)', 'rgb(42, 0, 34)'], // Naive clip based mapping would give rgb(90, 0, 76). NOTE: 0% lightness in Lab/LCH does not automatically correspond with sRGB black, ['hwb(from lch(100 116 334) h w b)', 'rgb(255, 255, 255)'], // Naive clip based mapping would give rgb(255, 150, 255). diff --git a/plugin-packs/postcss-preset-env/test/basic.autoprefixer.expect.css b/plugin-packs/postcss-preset-env/test/basic.autoprefixer.expect.css index 337c472e4..b8a402547 100644 --- a/plugin-packs/postcss-preset-env/test/basic.autoprefixer.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.autoprefixer.expect.css @@ -400,7 +400,7 @@ } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -430,11 +430,11 @@ color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -571,15 +571,15 @@ color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -600,7 +600,7 @@ @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -624,14 +624,14 @@ color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -646,7 +646,7 @@ } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -672,15 +672,15 @@ } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: magenta; color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.autoprefixer.false.expect.css b/plugin-packs/postcss-preset-env/test/basic.autoprefixer.false.expect.css index 8f9a3dfe2..e5a30a264 100644 --- a/plugin-packs/postcss-preset-env/test/basic.autoprefixer.false.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.autoprefixer.false.expect.css @@ -400,7 +400,7 @@ } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -430,11 +430,11 @@ color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -571,15 +571,15 @@ color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -600,7 +600,7 @@ @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -624,14 +624,14 @@ color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -646,7 +646,7 @@ } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -677,15 +677,15 @@ } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: magenta; color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.autoprefixer.remove.false.expect.css b/plugin-packs/postcss-preset-env/test/basic.autoprefixer.remove.false.expect.css index fb66bb13e..e01061f05 100644 --- a/plugin-packs/postcss-preset-env/test/basic.autoprefixer.remove.false.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.autoprefixer.remove.false.expect.css @@ -417,7 +417,7 @@ } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -447,11 +447,11 @@ color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -590,15 +590,15 @@ color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -619,7 +619,7 @@ @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -643,14 +643,14 @@ color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -665,7 +665,7 @@ } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -696,15 +696,15 @@ } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: magenta; color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.ch38.expect.css b/plugin-packs/postcss-preset-env/test/basic.ch38.expect.css index 7e6edfedd..a98763d24 100644 --- a/plugin-packs/postcss-preset-env/test/basic.ch38.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.ch38.expect.css @@ -313,7 +313,7 @@ } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -343,11 +343,11 @@ color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -483,15 +483,15 @@ color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -512,7 +512,7 @@ @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -536,14 +536,14 @@ color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -558,7 +558,7 @@ } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -584,15 +584,15 @@ } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: magenta; color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.ch88-ff78-saf10.expect.css b/plugin-packs/postcss-preset-env/test/basic.ch88-ff78-saf10.expect.css index 13f237838..5aeb52e96 100644 --- a/plugin-packs/postcss-preset-env/test/basic.ch88-ff78-saf10.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.ch88-ff78-saf10.expect.css @@ -313,7 +313,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -343,11 +343,11 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -481,15 +481,15 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -510,7 +510,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -534,14 +534,14 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -555,7 +555,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -581,14 +581,14 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.ch88-ff78.expect.css b/plugin-packs/postcss-preset-env/test/basic.ch88-ff78.expect.css index 2ba9a5a58..33dc4c1ef 100644 --- a/plugin-packs/postcss-preset-env/test/basic.ch88-ff78.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.ch88-ff78.expect.css @@ -313,7 +313,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -343,11 +343,11 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -475,15 +475,15 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -504,7 +504,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -528,14 +528,14 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -549,7 +549,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -575,14 +575,14 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.ch88-ff78.no-is-pseudo.expect.css b/plugin-packs/postcss-preset-env/test/basic.ch88-ff78.no-is-pseudo.expect.css index 2ba9a5a58..33dc4c1ef 100644 --- a/plugin-packs/postcss-preset-env/test/basic.ch88-ff78.no-is-pseudo.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.ch88-ff78.no-is-pseudo.expect.css @@ -313,7 +313,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -343,11 +343,11 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -475,15 +475,15 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -504,7 +504,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -528,14 +528,14 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -549,7 +549,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -575,14 +575,14 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.expect.css b/plugin-packs/postcss-preset-env/test/basic.expect.css index e839ed785..6ebd7b394 100644 --- a/plugin-packs/postcss-preset-env/test/basic.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.expect.css @@ -417,7 +417,7 @@ } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -447,11 +447,11 @@ color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -590,15 +590,15 @@ color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -619,7 +619,7 @@ @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -643,14 +643,14 @@ color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -665,7 +665,7 @@ } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -691,15 +691,15 @@ } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: magenta; color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.ff49.expect.css b/plugin-packs/postcss-preset-env/test/basic.ff49.expect.css index 0341adadd..2380e41bc 100644 --- a/plugin-packs/postcss-preset-env/test/basic.ff49.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.ff49.expect.css @@ -317,7 +317,7 @@ } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -347,11 +347,11 @@ color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -484,15 +484,15 @@ color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -513,7 +513,7 @@ @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -537,14 +537,14 @@ color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -558,7 +558,7 @@ } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -584,14 +584,14 @@ } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.ff66.expect.css b/plugin-packs/postcss-preset-env/test/basic.ff66.expect.css index da47cbb92..208985856 100644 --- a/plugin-packs/postcss-preset-env/test/basic.ff66.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.ff66.expect.css @@ -312,7 +312,7 @@ } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -342,11 +342,11 @@ color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -479,15 +479,15 @@ color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -508,7 +508,7 @@ @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -532,14 +532,14 @@ color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -553,7 +553,7 @@ } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -579,14 +579,14 @@ } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.hebrew.all-browsers-have-support.expect.css b/plugin-packs/postcss-preset-env/test/basic.hebrew.all-browsers-have-support.expect.css index 948f4c419..daabca675 100644 --- a/plugin-packs/postcss-preset-env/test/basic.hebrew.all-browsers-have-support.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.hebrew.all-browsers-have-support.expect.css @@ -301,7 +301,7 @@ } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: color(display-p3 0.02472 0.01150 0.00574 / 1); prop-4: color(display-p3 0.02472 0.01150 0.00574 / calc(33 / 22)); @@ -337,11 +337,11 @@ color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -477,13 +477,13 @@ .gradients-interpolation-method { --background-image: linear-gradient(in oklch decreasing hue, hsl(0deg 85% 75%) 0%, hsl(180deg 80% 65%) 100%); - background-image: radial-gradient(farthest-corner circle at 50% 115% in oklch, rgb(255, 157, 133) 0%, rgb(31, 251, 255) 100%); + background-image: radial-gradient(farthest-corner circle at 50% 115% in oklch, rgb(255, 154, 128) 0%, rgb(0, 254, 255) 100%); } @media (color-gamut: p3) { .gradients-interpolation-method { - background-image: radial-gradient(farthest-corner circle at 50% 115% in oklch, color(display-p3 1 0.61669 0.51066) 0%, color(display-p3 0.46442 0.97081 1) 100%); + background-image: radial-gradient(farthest-corner circle at 50% 115% in oklch, color(display-p3 1 0.58806 0.46644) 0%, color(display-p3 0.25144 0.99269 1) 100%); } } @@ -495,14 +495,14 @@ color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -516,7 +516,7 @@ } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } @media (color-gamut: p3) { @@ -548,14 +548,14 @@ } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.hebrew.expect.css b/plugin-packs/postcss-preset-env/test/basic.hebrew.expect.css index bab0df223..525ae75c8 100644 --- a/plugin-packs/postcss-preset-env/test/basic.hebrew.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.hebrew.expect.css @@ -415,7 +415,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -445,11 +445,11 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -586,15 +586,15 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -615,7 +615,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -639,14 +639,14 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -661,7 +661,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -687,15 +687,15 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: magenta; color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.ie10.expect.css b/plugin-packs/postcss-preset-env/test/basic.ie10.expect.css index e911a6237..5eac338c0 100644 --- a/plugin-packs/postcss-preset-env/test/basic.ie10.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.ie10.expect.css @@ -434,7 +434,7 @@ } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -464,11 +464,11 @@ color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -607,15 +607,15 @@ color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -636,7 +636,7 @@ @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -660,14 +660,14 @@ color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -682,7 +682,7 @@ } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -708,15 +708,15 @@ } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: magenta; color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.nesting.false.expect.css b/plugin-packs/postcss-preset-env/test/basic.nesting.false.expect.css index 2b95a78ef..b9f8568b6 100644 --- a/plugin-packs/postcss-preset-env/test/basic.nesting.false.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.nesting.false.expect.css @@ -415,7 +415,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -445,11 +445,11 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -588,15 +588,15 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -617,7 +617,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -641,14 +641,14 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -663,7 +663,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -689,15 +689,15 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: magenta; color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.op_mini.expect.css b/plugin-packs/postcss-preset-env/test/basic.op_mini.expect.css index 6f52edfaf..55765ac1b 100644 --- a/plugin-packs/postcss-preset-env/test/basic.op_mini.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.op_mini.expect.css @@ -399,7 +399,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -429,11 +429,11 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -568,15 +568,15 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -597,7 +597,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -621,14 +621,14 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -643,7 +643,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -669,15 +669,15 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: magenta; color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.preserve.false.expect.css b/plugin-packs/postcss-preset-env/test/basic.preserve.false.expect.css index 582dbd204..8e57a511e 100644 --- a/plugin-packs/postcss-preset-env/test/basic.preserve.false.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.preserve.false.expect.css @@ -521,7 +521,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -551,11 +551,11 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -701,15 +701,15 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -736,7 +736,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -754,14 +754,14 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -775,7 +775,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -811,13 +811,13 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: magenta; } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.preserve.true.expect.css b/plugin-packs/postcss-preset-env/test/basic.preserve.true.expect.css index bf63b82e9..460783956 100644 --- a/plugin-packs/postcss-preset-env/test/basic.preserve.true.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.preserve.true.expect.css @@ -673,7 +673,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-3: color(display-p3 0.02472 0.01150 0.00574 / 1); @@ -730,11 +730,11 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-6: rgb(197, 84, 124); color-6: oklch(60% 0.150 0); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); @@ -965,11 +965,11 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-2: color-mix(in lab, rgb(255 0 0 / 0), blue 65%); 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.4447 0 0.71665 / 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 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); + color-5: rgba(153, 0, 125, 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); color-5: color-mix(in lch, rgb(255 0 0 / 0), blue 65%); color-6: rgba(179, 0, 255, 0.65); color-6: color-mix(in hsl, rgb(255 0 0 / 0), blue 65%); @@ -1004,7 +1004,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -1035,13 +1035,13 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-6: lab(from lab(40% 56.6 39) l a b); color-7: rgb(163, 57, 39); color-7: lch(from lch(40% 56.6 39) l c h); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); + color-8: color(display-p3 0.52884 0 0); } } @@ -1053,7 +1053,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe @media (color-gamut: p3) { .test-css-color-5-interop { - color-9: color(display-p3 0.48896 0.1211 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -1084,12 +1084,12 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } @supports (color: color(display-p3 0 0 0%)) { .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } @media (color-gamut: p3) { @@ -1132,15 +1132,15 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: magenta; color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.safari15.expect.css b/plugin-packs/postcss-preset-env/test/basic.safari15.expect.css index 730e16049..d31cca750 100644 --- a/plugin-packs/postcss-preset-env/test/basic.safari15.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.safari15.expect.css @@ -285,7 +285,7 @@ } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: color(display-p3 0.02472 0.01150 0.00574 / 1); prop-4: color(display-p3 0.02472 0.01150 0.00574 / calc(33 / 22)); @@ -321,11 +321,11 @@ color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -460,15 +460,15 @@ color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -489,7 +489,7 @@ @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -513,14 +513,14 @@ color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -534,7 +534,7 @@ } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } @media (color-gamut: p3) { @@ -566,14 +566,14 @@ } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.stage0-ff49.expect.css b/plugin-packs/postcss-preset-env/test/basic.stage0-ff49.expect.css index f0cc5d0e4..8d89daeac 100644 --- a/plugin-packs/postcss-preset-env/test/basic.stage0-ff49.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.stage0-ff49.expect.css @@ -315,7 +315,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -345,11 +345,11 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -480,15 +480,15 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -509,7 +509,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -533,14 +533,14 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -554,7 +554,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -580,14 +580,14 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.stage0-ff66.expect.css b/plugin-packs/postcss-preset-env/test/basic.stage0-ff66.expect.css index c29f9b73a..013056bc1 100644 --- a/plugin-packs/postcss-preset-env/test/basic.stage0-ff66.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.stage0-ff66.expect.css @@ -310,7 +310,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -340,11 +340,11 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -475,15 +475,15 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -504,7 +504,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -528,14 +528,14 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -549,7 +549,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -575,14 +575,14 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.stage0.expect.css b/plugin-packs/postcss-preset-env/test/basic.stage0.expect.css index 4e9c66a9f..dd9ab9089 100644 --- a/plugin-packs/postcss-preset-env/test/basic.stage0.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.stage0.expect.css @@ -415,7 +415,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -445,11 +445,11 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -586,15 +586,15 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -615,7 +615,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -639,14 +639,14 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -661,7 +661,7 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -687,15 +687,15 @@ h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.doe } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: magenta; color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.supports-query.expect.css b/plugin-packs/postcss-preset-env/test/basic.supports-query.expect.css index cd16ab88c..16639bfb7 100644 --- a/plugin-packs/postcss-preset-env/test/basic.supports-query.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.supports-query.expect.css @@ -308,7 +308,7 @@ } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -338,11 +338,11 @@ color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); @@ -477,15 +477,15 @@ color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-5: rgba(149, 0, 122, 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-5: rgba(153, 0, 125, 0.65); color-6: rgba(179, 0, 255, 0.65); } @media (color-gamut: p3) { .color-mix { - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); } } @@ -506,7 +506,7 @@ @supports (color: color(display-p3 0 0 0%)) { .gradients-interpolation-method { - --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(189, 181, 255), rgb(172, 194, 255), rgb(155, 205, 255), rgb(126, 217, 255), rgb(99, 228, 255), rgb(94, 237, 237) 100%); + --background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(245, 140, 170), rgb(238, 146, 202), rgb(227, 155, 230), rgb(210, 166, 253), rgb(188, 179, 255), rgb(168, 193, 255), rgb(146, 206, 255), rgb(116, 218, 255), rgb(93, 229, 255), rgb(94, 237, 237) 100%); } @media (color-gamut: rec2020) { @@ -530,14 +530,14 @@ color-5: rgb(179, 157, 51); color-6: rgb(179, 35, 35); color-7: rgb(163, 57, 39); - color-8: rgb(141, 0, 0); - color-9: rgb(130, 31, 0); + color-8: rgb(143, 0, 0); + color-9: rgb(136, 19, 0); } @media (color-gamut: p3) { .test-css-color-5-interop { - color-8: color(display-p3 0.50566 0.0781 0); - color-9: color(display-p3 0.48896 0.1211 0); + color-8: color(display-p3 0.52884 0 0); + color-9: color(display-p3 0.50449 0.08687 0); } } @@ -551,7 +551,7 @@ } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -577,14 +577,14 @@ } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(141, 0, 0); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) rgb(143, 0, 0); color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(rgb(141, 0, 0), magenta); + color: light-dark(rgb(143, 0, 0), magenta); } @media (color-gamut: p3) { .schemed-colors { - color: light-dark(color(display-p3 0.50566 0.0781 0), magenta); + color: light-dark(color(display-p3 0.52884 0 0), magenta); } } diff --git a/plugin-packs/postcss-preset-env/test/basic.vendors-1.expect.css b/plugin-packs/postcss-preset-env/test/basic.vendors-1.expect.css index 6c20b825c..690e56152 100644 --- a/plugin-packs/postcss-preset-env/test/basic.vendors-1.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.vendors-1.expect.css @@ -421,7 +421,7 @@ } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -451,16 +451,16 @@ color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); color-7: color(display-p3 0.19244 0.58461 0.51559); - color-8: rgb(0, 149, 131); + color-8: rgb(0, 152, 131); color-8: color(display-p3 0.19244 0.58461 0.51559); - color-9: rgb(0, 149, 131); + color-9: rgb(0, 152, 131); color-9: color(display-p3 0.19244 0.58461 0.51559); - color-10: rgb(0, 149, 131); + color-10: rgb(0, 152, 131); color-10: color(display-p3 0.19244 0.58461 0.51559); - color-11: rgb(0, 149, 131); + color-11: rgb(0, 152, 131); color-11: color(display-p3 0.19244 0.58461 0.51559); color-12: rgb(188, 101, 59); @@ -589,10 +589,10 @@ color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: rgba(149, 0, 122, 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: rgba(153, 0, 125, 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); color-6: rgba(179, 0, 255, 0.65); } @@ -626,10 +626,10 @@ color-5: hwb(from rgb(179, 157, 51) h w b); color-6: lab(from rgb(179, 35, 35) l a b); color-7: lch(from rgb(163, 57, 39) l c h); - color-8: oklab(from rgb(141, 0, 0) l a b); - color-8: oklab(from color(display-p3 0.50566 0.0781 0) l a b); - color-9: oklch(from rgb(130, 31, 0) l c h); - color-9: oklch(from color(display-p3 0.48896 0.1211 0) l c h); + color-8: oklab(from rgb(143, 0, 0) l a b); + color-8: oklab(from color(display-p3 0.52884 0 0) l a b); + color-9: oklch(from rgb(136, 19, 0) l c h); + color-9: oklch(from color(display-p3 0.50449 0.08687 0) l c h); } .test-property-with-var { @@ -643,7 +643,7 @@ } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -669,11 +669,11 @@ } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) lch(from rgb(141, 0, 0) l c h); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) lch(from rgb(143, 0, 0) l c h); color: magenta; color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(lch(from rgb(141, 0, 0) l c h), magenta); - color: light-dark(lch(from color(display-p3 0.50566 0.0781 0) l c h), magenta); + color: light-dark(lch(from rgb(143, 0, 0) l c h), magenta); + color: light-dark(lch(from color(display-p3 0.52884 0 0) l c h), magenta); } .schemed-prop { diff --git a/plugin-packs/postcss-preset-env/test/basic.vendors-2.expect.css b/plugin-packs/postcss-preset-env/test/basic.vendors-2.expect.css index 6c20b825c..690e56152 100644 --- a/plugin-packs/postcss-preset-env/test/basic.vendors-2.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.vendors-2.expect.css @@ -421,7 +421,7 @@ } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -451,16 +451,16 @@ color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); color-7: color(display-p3 0.19244 0.58461 0.51559); - color-8: rgb(0, 149, 131); + color-8: rgb(0, 152, 131); color-8: color(display-p3 0.19244 0.58461 0.51559); - color-9: rgb(0, 149, 131); + color-9: rgb(0, 152, 131); color-9: color(display-p3 0.19244 0.58461 0.51559); - color-10: rgb(0, 149, 131); + color-10: rgb(0, 152, 131); color-10: color(display-p3 0.19244 0.58461 0.51559); - color-11: rgb(0, 149, 131); + color-11: rgb(0, 152, 131); color-11: color(display-p3 0.19244 0.58461 0.51559); color-12: rgb(188, 101, 59); @@ -589,10 +589,10 @@ color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: rgba(149, 0, 122, 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: rgba(153, 0, 125, 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); color-6: rgba(179, 0, 255, 0.65); } @@ -626,10 +626,10 @@ color-5: hwb(from rgb(179, 157, 51) h w b); color-6: lab(from rgb(179, 35, 35) l a b); color-7: lch(from rgb(163, 57, 39) l c h); - color-8: oklab(from rgb(141, 0, 0) l a b); - color-8: oklab(from color(display-p3 0.50566 0.0781 0) l a b); - color-9: oklch(from rgb(130, 31, 0) l c h); - color-9: oklch(from color(display-p3 0.48896 0.1211 0) l c h); + color-8: oklab(from rgb(143, 0, 0) l a b); + color-8: oklab(from color(display-p3 0.52884 0 0) l a b); + color-9: oklch(from rgb(136, 19, 0) l c h); + color-9: oklch(from color(display-p3 0.50449 0.08687 0) l c h); } .test-property-with-var { @@ -643,7 +643,7 @@ } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -669,11 +669,11 @@ } .schemed-colors { - --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) lch(from rgb(141, 0, 0) l c h); + --csstools-light-dark-toggle--1: var(--csstools-color-scheme--dark) lch(from rgb(143, 0, 0) l c h); color: magenta; color: var(--csstools-light-dark-toggle--1, magenta); - color: light-dark(lch(from rgb(141, 0, 0) l c h), magenta); - color: light-dark(lch(from color(display-p3 0.50566 0.0781 0) l c h), magenta); + color: light-dark(lch(from rgb(143, 0, 0) l c h), magenta); + color: light-dark(lch(from color(display-p3 0.52884 0 0) l c h), magenta); } .schemed-prop { diff --git a/plugin-packs/postcss-preset-env/test/basic.vendors-3.expect.css b/plugin-packs/postcss-preset-env/test/basic.vendors-3.expect.css index 28aa00a71..bf431e47d 100644 --- a/plugin-packs/postcss-preset-env/test/basic.vendors-3.expect.css +++ b/plugin-packs/postcss-preset-env/test/basic.vendors-3.expect.css @@ -420,7 +420,7 @@ } .color-function { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -450,16 +450,16 @@ color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); color-7: color(display-p3 0.19244 0.58461 0.51559); - color-8: rgb(0, 149, 131); + color-8: rgb(0, 152, 131); color-8: color(display-p3 0.19244 0.58461 0.51559); - color-9: rgb(0, 149, 131); + color-9: rgb(0, 152, 131); color-9: color(display-p3 0.19244 0.58461 0.51559); - color-10: rgb(0, 149, 131); + color-10: rgb(0, 152, 131); color-10: color(display-p3 0.19244 0.58461 0.51559); - color-11: rgb(0, 149, 131); + color-11: rgb(0, 152, 131); color-11: color(display-p3 0.19244 0.58461 0.51559); color-12: rgb(188, 101, 59); @@ -584,19 +584,19 @@ color-1: rgba(0, 0, 255, 0.65); color-2: rgba(0, 0, 255, 0.65); color-3: rgba(0, 0, 255, 0.65); - color-4: rgba(122, 0, 182, 0.65); - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: rgba(149, 0, 122, 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: rgba(153, 0, 125, 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); color-6: rgba(179, 0, 255, 0.65); } .gradients-interpolation-method { --background-image: linear-gradient(in oklch decreasing hue, hsl(0, 85%, 75%) 0%, hsl(180, 80%, 65%) 100%); - background-image: radial-gradient(farthest-corner circle at 50% 115% in oklch, rgb(255, 157, 133) 0%, rgb(31, 251, 255) 100%); + background-image: radial-gradient(farthest-corner circle at 50% 115% in oklch, rgb(255, 154, 128) 0%, rgb(0, 254, 255) 100%); - background-image: radial-gradient(farthest-corner circle at 50% 115% in oklch, color(display-p3 1 0.61669 0.51066) 0%, color(display-p3 0.46442 0.97081 1) 100%); + background-image: radial-gradient(farthest-corner circle at 50% 115% in oklch, color(display-p3 1 0.58806 0.46644) 0%, color(display-p3 0.25144 0.99269 1) 100%); } .test-css-color-5-interop { @@ -607,10 +607,10 @@ color-5: hwb(from rgb(179, 157, 51) h w b); color-6: lab(from rgb(179, 35, 35) l a b); color-7: lch(from rgb(163, 57, 39) l c h); - color-8: oklab(from rgb(141, 0, 0) l a b); - color-8: oklab(from color(display-p3 0.50566 0.0781 0) l a b); - color-9: oklch(from rgb(130, 31, 0) l c h); - color-9: oklch(from color(display-p3 0.48896 0.1211 0) l c h); + color-8: oklab(from rgb(143, 0, 0) l a b); + color-8: oklab(from color(display-p3 0.52884 0 0) l a b); + color-9: oklch(from rgb(136, 19, 0) l c h); + color-9: oklch(from color(display-p3 0.50449 0.08687 0) l c h); } .test-property-with-var { @@ -624,7 +624,7 @@ } .out-of-gamut { - --color: rgb(0, 249, 66); + --color: rgb(0, 251, 41); } .issue-1244--a { @@ -648,8 +648,8 @@ } .schemed-colors { - color: light-dark(lch(from rgb(141, 0, 0) l c h), magenta); - color: light-dark(lch(from color(display-p3 0.50566 0.0781 0) l c h), magenta); + color: light-dark(lch(from rgb(143, 0, 0) l c h), magenta); + color: light-dark(lch(from color(display-p3 0.52884 0 0) l c h), magenta); } .schemed-prop { diff --git a/plugin-packs/postcss-preset-env/test/layers-basic.expect.css b/plugin-packs/postcss-preset-env/test/layers-basic.expect.css index 02b774efe..2c2d80e37 100644 --- a/plugin-packs/postcss-preset-env/test/layers-basic.expect.css +++ b/plugin-packs/postcss-preset-env/test/layers-basic.expect.css @@ -566,7 +566,7 @@ h1.test-custom-selectors:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):n } .color-function:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-4: rgb(7, 3, 1); @@ -596,11 +596,11 @@ h1.test-custom-selectors:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):n color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); color-13: rgb(188, 101, 59); diff --git a/plugin-packs/postcss-preset-env/test/layers-basic.preserve.true.expect.css b/plugin-packs/postcss-preset-env/test/layers-basic.preserve.true.expect.css index bf75e10f8..9e82bf562 100644 --- a/plugin-packs/postcss-preset-env/test/layers-basic.preserve.true.expect.css +++ b/plugin-packs/postcss-preset-env/test/layers-basic.preserve.true.expect.css @@ -672,7 +672,7 @@ h1.test-custom-selectors:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):n } .color-function:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) { - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)'; prop-3: rgb(7, 3, 1); prop-3: color(display-p3 0.02472 0.01150 0.00574 / 1); @@ -729,11 +729,11 @@ h1.test-custom-selectors:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):n color-6: rgb(197, 84, 124); color-6: oklch(60% 0.150 0); - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); color-12: rgb(188, 101, 59); diff --git a/plugins/postcss-color-function/test/basic.expect.css b/plugins/postcss-color-function/test/basic.expect.css index 908da4e15..6ff68967d 100644 --- a/plugins/postcss-color-function/test/basic.expect.css +++ b/plugins/postcss-color-function/test/basic.expect.css @@ -72,9 +72,9 @@ } .test-percentage-xyz { - color-1: rgb(249, 0, 135); - color-2: rgb(255, 0, 127); - color-3: rgb(255, 0, 127); + color-1: rgb(252, 0, 135); + color-2: rgb(255, 0, 126); + color-3: rgb(255, 0, 126); } .test-author-provided-fallback { @@ -109,88 +109,88 @@ .test-gamut { /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B48%2C-53%2C12%5D%2C%5B58%2C-54%2C69%5D%5D */ /* out */ - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); /* out */ - prop-2: rgb(50, 160, 0); + prop-2: rgb(38, 161, 0); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B45%2C-13%2C29%5D%2C%5B77%2C33%2C97%5D%5D */ /* in */ prop-3: rgb(97, 112, 56); /* out */ - prop-4: rgb(255, 169, 30); + prop-4: rgb(255, 166, 0); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B76%2C-29%2C-23%5D%2C%5B16%2C-32%2C24%5D%5D */ /* in */ prop-5: rgb(85, 204, 229); /* out */ - prop-6: rgb(0, 47, 8); + prop-6: rgb(0, 50, 0); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B85%2C16%2C29%5D%2C%5B55%2C-42%2C58%5D%5D */ /* out */ prop-7: rgb(255, 201, 158); /* out */ - prop-8: rgb(71, 149, 0); + prop-8: rgb(70, 149, 0); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B87%2C-94%2C103%5D%2C%5B88%2C-9%2C62%5D%5D */ /* out */ - prop-9: rgb(0, 252, 0); + prop-9: rgb(0, 253, 0); /* in */ prop-10: rgb(231, 224, 96); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B69%2C-35%2C-39%5D%2C%5B68%2C61%2C39%5D%5D */ /* out */ - prop-11: rgb(0, 186, 229); + prop-11: rgb(0, 187, 234); /* out */ - prop-12: rgb(255, 122, 110); + prop-12: rgb(255, 117, 105); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B60%2C-28%2C74%5D%2C%5B65%2C81%2C-13%5D%5D */ /* out */ - prop-13: rgb(121, 156, 0); + prop-13: rgb(119, 157, 0); /* out */ - prop-14: rgb(255, 92, 182); + prop-14: rgb(255, 89, 183); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B60%2C-28%2C15%5D%2C%5B65%2C81%2C-11%5D%5D */ /* in */ prop-15: rgb(96, 158, 117); /* out */ - prop-16: rgb(255, 92, 179); + prop-16: rgb(255, 90, 179); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B78%2C-64%2C-44%5D%2C%5B76%2C81%2C-11%5D%5D */ /* out */ - prop-17: rgb(0, 212, 236); + prop-17: rgb(0, 214, 243); /* out */ - prop-18: rgb(255, 160, 204); + prop-18: rgb(255, 156, 205); } .test-out-of-range-values-srgb { color-1: rgb(128, 0, 255); - color-2: rgb(122, 0, 236); + color-2: rgb(125, 0, 245); color-3: rgb(26, 255, 26); - color-4: rgb(169, 255, 161); + color-4: rgb(159, 255, 151); } .test-lime { - color-1: rgb(1, 255, 0); - color-2: rgb(1, 255, 0); - color-3: rgb(1, 255, 0); - color-4: rgb(1, 255, 0); - color-5: rgb(1, 255, 0); - color-6: rgb(1, 255, 0); - color-7: rgb(1, 255, 0); - color-8: rgb(1, 255, 0); - color-9: rgb(1, 255, 0); + color-1: rgb(0, 255, 0); + color-2: rgb(0, 255, 0); + color-3: rgb(0, 255, 0); + color-4: rgb(0, 255, 0); + color-5: rgb(0, 255, 0); + color-6: rgb(0, 255, 0); + color-7: rgb(0, 255, 0); + color-8: rgb(0, 255, 0); + color-9: rgb(0, 255, 0); } .test-blue-teal { - color-1: rgb(0, 131, 136); - color-2: rgb(0, 131, 136); - color-3: rgb(0, 131, 136); - color-4: rgb(0, 131, 136); - color-5: rgb(0, 131, 136); - color-6: rgb(0, 131, 136); - color-7: rgb(0, 131, 136); - color-8: rgb(0, 131, 136); - color-9: rgb(0, 131, 136); + color-1: rgb(0, 132, 138); + color-2: rgb(0, 132, 138); + color-3: rgb(0, 132, 138); + color-4: rgb(0, 132, 138); + color-5: rgb(0, 132, 138); + color-6: rgb(0, 132, 138); + color-7: rgb(0, 132, 138); + color-8: rgb(0, 132, 138); + color-9: rgb(0, 132, 138); } .test-bright-purple { @@ -213,5 +213,5 @@ } to-clone { - color: rgb(255, 15, 14); + color: rgb(255, 11, 12); } diff --git a/plugins/postcss-color-function/test/basic.preserve-true.expect.css b/plugins/postcss-color-function/test/basic.preserve-true.expect.css index 68637608d..3ade29aae 100644 --- a/plugins/postcss-color-function/test/basic.preserve-true.expect.css +++ b/plugins/postcss-color-function/test/basic.preserve-true.expect.css @@ -104,11 +104,11 @@ } .test-percentage-xyz { - color-1: rgb(249, 0, 135); + color-1: rgb(252, 0, 135); color-1: color(xyz-d50 64.331% 0.19245 0.16771); - color-2: rgb(255, 0, 127); + color-2: rgb(255, 0, 126); color-2: color(xyz-d65 0.64331 19.245% 0.16771); - color-3: rgb(255, 0, 127); + color-3: rgb(255, 0, 126); color-3: color(xyz 0.64331 0.19245 16.771%); } @@ -154,10 +154,10 @@ .test-gamut { /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B48%2C-53%2C12%5D%2C%5B58%2C-54%2C69%5D%5D */ /* out */ - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-1: color(display-p3 0.00000 0.51872 0.36985); /* out */ - prop-2: rgb(50, 160, 0); + prop-2: rgb(38, 161, 0); prop-2: color(display-p3 0.31275 0.62335 0.08647); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B45%2C-13%2C29%5D%2C%5B77%2C33%2C97%5D%5D */ @@ -165,7 +165,7 @@ prop-3: rgb(97, 112, 56); prop-3: color(display-p3 0.39215 0.43776 0.24705); /* out */ - prop-4: rgb(255, 169, 30); + prop-4: rgb(255, 166, 0); prop-4: color(display-p3 0.99733 0.66278 0.12085); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B76%2C-29%2C-23%5D%2C%5B16%2C-32%2C24%5D%5D */ @@ -173,7 +173,7 @@ prop-5: rgb(85, 204, 229); prop-5: color(display-p3 0.46284 0.78863 0.88439); /* out */ - prop-6: rgb(0, 47, 8); + prop-6: rgb(0, 50, 0); prop-6: color(display-p3 0.00652 0.18999 0.01056); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B85%2C16%2C29%5D%2C%5B55%2C-42%2C58%5D%5D */ @@ -181,12 +181,12 @@ prop-7: rgb(255, 201, 158); prop-7: color(display-p3 0.96684 0.79482 0.64336); /* out */ - prop-8: rgb(71, 149, 0); + prop-8: rgb(70, 149, 0); prop-8: color(display-p3 0.35483 0.57788 0.15007); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B87%2C-94%2C103%5D%2C%5B88%2C-9%2C62%5D%5D */ /* out */ - prop-9: rgb(0, 252, 0); + prop-9: rgb(0, 253, 0); prop-9: color(display-p3 0.32231 0.99185 0.02928); /* in */ prop-10: rgb(231, 224, 96); @@ -194,18 +194,18 @@ /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B69%2C-35%2C-39%5D%2C%5B68%2C61%2C39%5D%5D */ /* out */ - prop-11: rgb(0, 186, 229); + prop-11: rgb(0, 187, 234); prop-11: color(display-p3 0.16541 0.72332 0.91352); /* out */ - prop-12: rgb(255, 122, 110); + prop-12: rgb(255, 117, 105); prop-12: color(display-p3 0.99104 0.47662 0.41939); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B60%2C-28%2C74%5D%2C%5B65%2C81%2C-13%5D%5D */ /* out */ - prop-13: rgb(121, 156, 0); + prop-13: rgb(119, 157, 0); prop-13: color(display-p3 0.49844 0.61099 0.07831); /* out */ - prop-14: rgb(255, 92, 182); + prop-14: rgb(255, 89, 183); prop-14: color(display-p3 0.99687 0.35134 0.71095); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B60%2C-28%2C15%5D%2C%5B65%2C81%2C-11%5D%5D */ @@ -213,68 +213,68 @@ prop-15: rgb(96, 158, 117); prop-15: color(display-p3 0.43165 0.61289 0.47061); /* out */ - prop-16: rgb(255, 92, 179); + prop-16: rgb(255, 90, 179); prop-16: color(display-p3 0.99937 0.35096 0.69833); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B78%2C-64%2C-44%5D%2C%5B76%2C81%2C-11%5D%5D */ /* out */ - prop-17: rgb(0, 212, 236); + prop-17: rgb(0, 214, 243); prop-17: color(display-p3 0.00000 0.83784 0.97033); /* out */ - prop-18: rgb(255, 160, 204); + prop-18: rgb(255, 156, 205); prop-18: color(display-p3 1.00000 0.62326 0.79886); } .test-out-of-range-values-srgb { color-1: rgb(128, 0, 255); color-1: color(srgb 0.5 0 1); - color-2: rgb(122, 0, 236); + color-2: rgb(125, 0, 245); color-2: color(srgb 0.5 -0.2 1); color-3: rgb(26, 255, 26); color-3: color(srgb 0.1 1 0.1); - color-4: rgb(169, 255, 161); + color-4: rgb(159, 255, 151); color-4: color(srgb 0.1 1.1 0.1); } .test-lime { - color-1: rgb(1, 255, 0); + color-1: rgb(0, 255, 0); color-1: color(srgb 0.0005556487875468122 0.9999999999999999 -0.00220276712790066); - color-2: rgb(1, 255, 0); + color-2: rgb(0, 255, 0); color-2: color(srgb-linear 0.000043006872101146454 0.9999999999999999 -0.00017049281175701703); - color-3: rgb(1, 255, 0); + color-3: rgb(0, 255, 0); color-3: color(a98-rgb 0.565 1 0.234); - color-4: rgb(1, 255, 0); + color-4: rgb(0, 255, 0); color-4: color(prophoto-rgb 0.5402796954751572 0.9275945561561767 0.30435477084804174); - color-5: rgb(1, 255, 0); + color-5: rgb(0, 255, 0); color-5: color(display-p3 0.45844420720487417 0.9852652233445233 0.29798036139719497); - color-6: rgb(1, 255, 0); + color-6: rgb(0, 255, 0); color-6: color(rec2020 0.5675603321833232 0.9592792129938423 0.2686829491074993); - color-7: rgb(1, 255, 0); + color-7: rgb(0, 255, 0); color-7: color(xyz-d50 0.3851458288094242 0.7168862873215868 0.09696013568183873); - color-8: rgb(1, 255, 0); + color-8: rgb(0, 255, 0); color-8: color(xyz-d65 0.35757130434515494 0.7151655154354521 0.11903355225337156); - color-9: rgb(1, 255, 0); + color-9: rgb(0, 255, 0); color-9: color(xyz 0.35757130434515494 0.7151655154354521 0.11903355225337156); } .test-blue-teal { - color-1: rgb(0, 131, 136); + color-1: rgb(0, 132, 138); color-1: color(srgb -0.13610556145124594 0.5177053690420603 0.540031109817831); - color-2: rgb(0, 131, 136); + color-2: rgb(0, 132, 138); color-2: color(srgb-linear -0.01656723676661187 0.23079644121427306 0.25298181882824156); - color-3: rgb(0, 131, 136); + color-3: rgb(0, 132, 138); color-3: color(a98-rgb 0.265 0.5134 0.5344); - color-4: rgb(0, 131, 136); + color-4: rgb(0, 132, 138); color-4: color(prophoto-rgb 0.28284813138491105 0.41695332740189284 0.4586239337463392); - color-5: rgb(0, 131, 136); + color-5: rgb(0, 132, 138); color-5: color(display-p3 0.18049383596973329 0.5091259470889726 0.5339002129941044); - color-6: rgb(0, 131, 136); + color-6: rgb(0, 132, 138); color-6: color(rec2020 0.24657637908526203 0.44994210472189566 0.486194553499425); - color-7: rgb(0, 131, 136); + color-7: rgb(0, 132, 138); color-7: color(xyz-d50 0.11786343156307554 0.1771045882551784 0.2028294891298204); - color-8: rgb(0, 131, 136); + color-8: rgb(0, 132, 138); color-8: color(xyz-d65 0.12135537506539545 0.1797988884168019 0.2676568254682071); - color-9: rgb(0, 131, 136); + color-9: rgb(0, 132, 138); color-9: color(xyz 0.12135537506539545 0.1797988884168019 0.2676568254682071); } @@ -307,6 +307,6 @@ } to-clone { - color: rgb(255, 15, 14); + color: rgb(255, 11, 12); color: color(display-p3 1 0 0); } diff --git a/plugins/postcss-color-function/test/basic.with-cloned-rules.expect.css b/plugins/postcss-color-function/test/basic.with-cloned-rules.expect.css index b902c7456..e540f7e0f 100644 --- a/plugins/postcss-color-function/test/basic.with-cloned-rules.expect.css +++ b/plugins/postcss-color-function/test/basic.with-cloned-rules.expect.css @@ -104,11 +104,11 @@ } .test-percentage-xyz { - color-1: rgb(249, 0, 135); + color-1: rgb(252, 0, 135); color-1: color(xyz-d50 64.331% 0.19245 0.16771); - color-2: rgb(255, 0, 127); + color-2: rgb(255, 0, 126); color-2: color(xyz-d65 0.64331 19.245% 0.16771); - color-3: rgb(255, 0, 127); + color-3: rgb(255, 0, 126); color-3: color(xyz 0.64331 0.19245 16.771%); } @@ -154,10 +154,10 @@ .test-gamut { /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B48%2C-53%2C12%5D%2C%5B58%2C-54%2C69%5D%5D */ /* out */ - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-1: color(display-p3 0.00000 0.51872 0.36985); /* out */ - prop-2: rgb(50, 160, 0); + prop-2: rgb(38, 161, 0); prop-2: color(display-p3 0.31275 0.62335 0.08647); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B45%2C-13%2C29%5D%2C%5B77%2C33%2C97%5D%5D */ @@ -165,7 +165,7 @@ prop-3: rgb(97, 112, 56); prop-3: color(display-p3 0.39215 0.43776 0.24705); /* out */ - prop-4: rgb(255, 169, 30); + prop-4: rgb(255, 166, 0); prop-4: color(display-p3 0.99733 0.66278 0.12085); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B76%2C-29%2C-23%5D%2C%5B16%2C-32%2C24%5D%5D */ @@ -173,7 +173,7 @@ prop-5: rgb(85, 204, 229); prop-5: color(display-p3 0.46284 0.78863 0.88439); /* out */ - prop-6: rgb(0, 47, 8); + prop-6: rgb(0, 50, 0); prop-6: color(display-p3 0.00652 0.18999 0.01056); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B85%2C16%2C29%5D%2C%5B55%2C-42%2C58%5D%5D */ @@ -181,12 +181,12 @@ prop-7: rgb(255, 201, 158); prop-7: color(display-p3 0.96684 0.79482 0.64336); /* out */ - prop-8: rgb(71, 149, 0); + prop-8: rgb(70, 149, 0); prop-8: color(display-p3 0.35483 0.57788 0.15007); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B87%2C-94%2C103%5D%2C%5B88%2C-9%2C62%5D%5D */ /* out */ - prop-9: rgb(0, 252, 0); + prop-9: rgb(0, 253, 0); prop-9: color(display-p3 0.32231 0.99185 0.02928); /* in */ prop-10: rgb(231, 224, 96); @@ -194,18 +194,18 @@ /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B69%2C-35%2C-39%5D%2C%5B68%2C61%2C39%5D%5D */ /* out */ - prop-11: rgb(0, 186, 229); + prop-11: rgb(0, 187, 234); prop-11: color(display-p3 0.16541 0.72332 0.91352); /* out */ - prop-12: rgb(255, 122, 110); + prop-12: rgb(255, 117, 105); prop-12: color(display-p3 0.99104 0.47662 0.41939); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B60%2C-28%2C74%5D%2C%5B65%2C81%2C-13%5D%5D */ /* out */ - prop-13: rgb(121, 156, 0); + prop-13: rgb(119, 157, 0); prop-13: color(display-p3 0.49844 0.61099 0.07831); /* out */ - prop-14: rgb(255, 92, 182); + prop-14: rgb(255, 89, 183); prop-14: color(display-p3 0.99687 0.35134 0.71095); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B60%2C-28%2C15%5D%2C%5B65%2C81%2C-11%5D%5D */ @@ -213,68 +213,68 @@ prop-15: rgb(96, 158, 117); prop-15: color(display-p3 0.43165 0.61289 0.47061); /* out */ - prop-16: rgb(255, 92, 179); + prop-16: rgb(255, 90, 179); prop-16: color(display-p3 0.99937 0.35096 0.69833); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B78%2C-64%2C-44%5D%2C%5B76%2C81%2C-11%5D%5D */ /* out */ - prop-17: rgb(0, 212, 236); + prop-17: rgb(0, 214, 243); prop-17: color(display-p3 0.00000 0.83784 0.97033); /* out */ - prop-18: rgb(255, 160, 204); + prop-18: rgb(255, 156, 205); prop-18: color(display-p3 1.00000 0.62326 0.79886); } .test-out-of-range-values-srgb { color-1: rgb(128, 0, 255); color-1: color(srgb 0.5 0 1); - color-2: rgb(122, 0, 236); + color-2: rgb(125, 0, 245); color-2: color(srgb 0.5 -0.2 1); color-3: rgb(26, 255, 26); color-3: color(srgb 0.1 1 0.1); - color-4: rgb(169, 255, 161); + color-4: rgb(159, 255, 151); color-4: color(srgb 0.1 1.1 0.1); } .test-lime { - color-1: rgb(1, 255, 0); + color-1: rgb(0, 255, 0); color-1: color(srgb 0.0005556487875468122 0.9999999999999999 -0.00220276712790066); - color-2: rgb(1, 255, 0); + color-2: rgb(0, 255, 0); color-2: color(srgb-linear 0.000043006872101146454 0.9999999999999999 -0.00017049281175701703); - color-3: rgb(1, 255, 0); + color-3: rgb(0, 255, 0); color-3: color(a98-rgb 0.565 1 0.234); - color-4: rgb(1, 255, 0); + color-4: rgb(0, 255, 0); color-4: color(prophoto-rgb 0.5402796954751572 0.9275945561561767 0.30435477084804174); - color-5: rgb(1, 255, 0); + color-5: rgb(0, 255, 0); color-5: color(display-p3 0.45844420720487417 0.9852652233445233 0.29798036139719497); - color-6: rgb(1, 255, 0); + color-6: rgb(0, 255, 0); color-6: color(rec2020 0.5675603321833232 0.9592792129938423 0.2686829491074993); - color-7: rgb(1, 255, 0); + color-7: rgb(0, 255, 0); color-7: color(xyz-d50 0.3851458288094242 0.7168862873215868 0.09696013568183873); - color-8: rgb(1, 255, 0); + color-8: rgb(0, 255, 0); color-8: color(xyz-d65 0.35757130434515494 0.7151655154354521 0.11903355225337156); - color-9: rgb(1, 255, 0); + color-9: rgb(0, 255, 0); color-9: color(xyz 0.35757130434515494 0.7151655154354521 0.11903355225337156); } .test-blue-teal { - color-1: rgb(0, 131, 136); + color-1: rgb(0, 132, 138); color-1: color(srgb -0.13610556145124594 0.5177053690420603 0.540031109817831); - color-2: rgb(0, 131, 136); + color-2: rgb(0, 132, 138); color-2: color(srgb-linear -0.01656723676661187 0.23079644121427306 0.25298181882824156); - color-3: rgb(0, 131, 136); + color-3: rgb(0, 132, 138); color-3: color(a98-rgb 0.265 0.5134 0.5344); - color-4: rgb(0, 131, 136); + color-4: rgb(0, 132, 138); color-4: color(prophoto-rgb 0.28284813138491105 0.41695332740189284 0.4586239337463392); - color-5: rgb(0, 131, 136); + color-5: rgb(0, 132, 138); color-5: color(display-p3 0.18049383596973329 0.5091259470889726 0.5339002129941044); - color-6: rgb(0, 131, 136); + color-6: rgb(0, 132, 138); color-6: color(rec2020 0.24657637908526203 0.44994210472189566 0.486194553499425); - color-7: rgb(0, 131, 136); + color-7: rgb(0, 132, 138); color-7: color(xyz-d50 0.11786343156307554 0.1771045882551784 0.2028294891298204); - color-8: rgb(0, 131, 136); + color-8: rgb(0, 132, 138); color-8: color(xyz-d65 0.12135537506539545 0.1797988884168019 0.2676568254682071); - color-9: rgb(0, 131, 136); + color-9: rgb(0, 132, 138); color-9: color(xyz 0.12135537506539545 0.1797988884168019 0.2676568254682071); } @@ -307,11 +307,11 @@ } cloned { - color: rgb(255, 15, 14); + color: rgb(255, 11, 12); color: color(display-p3 1 0 0); } to-clone { - color: rgb(255, 15, 14); + color: rgb(255, 11, 12); color: color(display-p3 1 0 0); } diff --git a/plugins/postcss-color-function/test/lab-function-interop.expect.css b/plugins/postcss-color-function/test/lab-function-interop.expect.css index a4d4910d7..72e91a48c 100644 --- a/plugins/postcss-color-function/test/lab-function-interop.expect.css +++ b/plugins/postcss-color-function/test/lab-function-interop.expect.css @@ -1,7 +1,7 @@ .test-lab-interop { /* rgb(196, 0, 48); from postcss-lab-function */ - color-1: rgb(194, 0, 49); - color-1: color(display-p3 0.71499 0 0.19398); + color-1: rgb(196, 0, 48); + color-1: color(display-p3 0.73296 0 0.17714); color-1: lab(40% 80 39); } diff --git a/plugins/postcss-color-function/test/lab-function-interop.preserve.false.expect.css b/plugins/postcss-color-function/test/lab-function-interop.preserve.false.expect.css index e260e7203..aaaf5dff8 100644 --- a/plugins/postcss-color-function/test/lab-function-interop.preserve.false.expect.css +++ b/plugins/postcss-color-function/test/lab-function-interop.preserve.false.expect.css @@ -1,7 +1,7 @@ .test-lab-interop { /* rgb(196, 0, 48); from postcss-lab-function */ - color-1: rgb(194, 0, 49); - color-1: color(display-p3 0.71499 0 0.19398); + color-1: rgb(196, 0, 48); + color-1: color(display-p3 0.73296 0 0.17714); } @supports (--one-a50-var: color(display-p3 0.1 0.1 0.1)) { diff --git a/plugins/postcss-color-mix-function/test/basic.expect.css b/plugins/postcss-color-mix-function/test/basic.expect.css index 1753b679d..c49bedbcc 100644 --- a/plugins/postcss-color-mix-function/test/basic.expect.css +++ b/plugins/postcss-color-mix-function/test/basic.expect.css @@ -3,7 +3,7 @@ } .complex { - color: rgba(255, 102, 0, 0.34); + color: rgba(255, 99, 0, 0.34); color: color(display-p3 0.9361 0.42808 0.14191 / 0.34); } @@ -40,18 +40,18 @@ } .spec-example-6 { - color-1: rgb(174, 138, 255); + color-1: rgb(175, 137, 255); color-1: color(display-p3 0.66273 0.5437 0.98509); /* https://github.com/w3c/csswg-drafts/issues/8609 */ - color-2: rgb(119, 163, 255); - color-2: color(display-p3 0.49508 0.63378 1); + color-2: rgb(116, 163, 255); + color-2: color(display-p3 0.49247 0.63302 1); color-3: rgb(128, 128, 255); } .spec-example-7 { /* https://github.com/w3c/csswg-drafts/issues/8444 */ - color-1: rgb(151, 255, 117); - color-1: color(display-p3 0.63217 1 0.41255); + color-1: rgb(127, 255, 77); + color-1: color(display-p3 0.60436 1 0.34916); } .spec-example-8 { @@ -93,8 +93,8 @@ color-2: color(display-p3 0.60204 0.43193 0.12323); /* rgb(143, 117, 0) */ - color-3: rgb(142, 117, 0); - color-3: color(display-p3 0.54586 0.46077 0); + color-3: rgb(143, 117, 0); + color-3: color(display-p3 0.55128 0.45926 0); /* rgb(89, 122, 0) */ color-4: rgb(89, 122, 0); @@ -104,18 +104,18 @@ color-5: color(display-p3 0.3137 0.48778 0.12828); /* rgb(49, 128, 0) */ - color-6: rgb(54, 127, 0); + color-6: rgb(49, 128, 0); color-6: color(display-p3 0.2789 0.49535 0.06321); /* rgb(243, 40, 0) */ color-7: rgb(243, 40, 0); /* rgb(237, 55, 0) */ - color-8: rgb(236, 56, 0); + color-8: rgb(237, 55, 0); color-8: color(display-p3 0.85526 0.28166 0.13354); /* rgb(235, 59, 0) */ - color-9: rgb(229, 68, 0); + color-9: rgb(235, 59, 0); color-9: color(display-p3 0.84845 0.29298 0.07064); } @@ -138,10 +138,10 @@ } .zero-alpha-cylindrical { - color-4: rgba(122, 0, 182, 0.65); - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); - color-5: rgba(149, 0, 122, 0.65); - color-5: color(display-p3 0.55417 0 0.48083 / 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 0.65); + color-5: rgba(153, 0, 125, 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); color-6: rgba(179, 0, 255, 0.65); } diff --git a/plugins/postcss-color-mix-function/test/basic.preserve-true.expect.css b/plugins/postcss-color-mix-function/test/basic.preserve-true.expect.css index 5ba6964c4..1e04cd2df 100644 --- a/plugins/postcss-color-mix-function/test/basic.preserve-true.expect.css +++ b/plugins/postcss-color-mix-function/test/basic.preserve-true.expect.css @@ -4,7 +4,7 @@ } .complex { - color: rgba(255, 102, 0, 0.34); + color: rgba(255, 99, 0, 0.34); color: color(display-p3 0.9361 0.42808 0.14191 / 0.34); color: color-mix( in lch, @@ -69,12 +69,12 @@ } .spec-example-6 { - color-1: rgb(174, 138, 255); + color-1: rgb(175, 137, 255); color-1: color(display-p3 0.66273 0.5437 0.98509); color-1: color-mix(in lch, white, blue); /* https://github.com/w3c/csswg-drafts/issues/8609 */ - color-2: rgb(119, 163, 255); - color-2: color(display-p3 0.49508 0.63378 1); + color-2: rgb(116, 163, 255); + color-2: color(display-p3 0.49247 0.63302 1); color-2: color-mix(in oklch, white, blue); color-3: rgb(128, 128, 255); color-3: color-mix(in srgb, white, blue); @@ -82,8 +82,8 @@ .spec-example-7 { /* https://github.com/w3c/csswg-drafts/issues/8444 */ - color-1: rgb(151, 255, 117); - color-1: color(display-p3 0.63217 1 0.41255); + color-1: rgb(127, 255, 77); + color-1: color(display-p3 0.60436 1 0.34916); color-1: color-mix(in hsl, color(display-p3 0 1 0) 80%, yellow); } @@ -140,8 +140,8 @@ color-2: color-mix(in lab, red, green); /* rgb(143, 117, 0) */ - color-3: rgb(142, 117, 0); - color-3: color(display-p3 0.54586 0.46077 0); + color-3: rgb(143, 117, 0); + color-3: color(display-p3 0.55128 0.45926 0); color-3: color-mix(in lch, red, green); /* rgb(89, 122, 0) */ @@ -154,7 +154,7 @@ color-5: color-mix(in lab, red, green 90%); /* rgb(49, 128, 0) */ - color-6: rgb(54, 127, 0); + color-6: rgb(49, 128, 0); color-6: color(display-p3 0.2789 0.49535 0.06321); color-6: color-mix(in lch, red, green 90%); @@ -163,12 +163,12 @@ color-7: color-mix(in xyz, red 90%, green); /* rgb(237, 55, 0) */ - color-8: rgb(236, 56, 0); + color-8: rgb(237, 55, 0); color-8: color(display-p3 0.85526 0.28166 0.13354); color-8: color-mix(in lab, red 90%, green); /* rgb(235, 59, 0) */ - color-9: rgb(229, 68, 0); + color-9: rgb(235, 59, 0); color-9: color(display-p3 0.84845 0.29298 0.07064); color-9: color-mix(in lch, red 90%, green); } @@ -201,11 +201,11 @@ } .zero-alpha-cylindrical { - color-4: rgba(122, 0, 182, 0.65); - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 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); + color-5: rgba(153, 0, 125, 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); color-5: color-mix(in lch, rgb(255 0 0 / 0), blue 65%); color-6: rgba(179, 0, 255, 0.65); color-6: color-mix(in hsl, rgb(255 0 0 / 0), blue 65%); diff --git a/plugins/postcss-color-mix-function/test/basic.with-cloned-rules.expect.css b/plugins/postcss-color-mix-function/test/basic.with-cloned-rules.expect.css index 5ba6964c4..1e04cd2df 100644 --- a/plugins/postcss-color-mix-function/test/basic.with-cloned-rules.expect.css +++ b/plugins/postcss-color-mix-function/test/basic.with-cloned-rules.expect.css @@ -4,7 +4,7 @@ } .complex { - color: rgba(255, 102, 0, 0.34); + color: rgba(255, 99, 0, 0.34); color: color(display-p3 0.9361 0.42808 0.14191 / 0.34); color: color-mix( in lch, @@ -69,12 +69,12 @@ } .spec-example-6 { - color-1: rgb(174, 138, 255); + color-1: rgb(175, 137, 255); color-1: color(display-p3 0.66273 0.5437 0.98509); color-1: color-mix(in lch, white, blue); /* https://github.com/w3c/csswg-drafts/issues/8609 */ - color-2: rgb(119, 163, 255); - color-2: color(display-p3 0.49508 0.63378 1); + color-2: rgb(116, 163, 255); + color-2: color(display-p3 0.49247 0.63302 1); color-2: color-mix(in oklch, white, blue); color-3: rgb(128, 128, 255); color-3: color-mix(in srgb, white, blue); @@ -82,8 +82,8 @@ .spec-example-7 { /* https://github.com/w3c/csswg-drafts/issues/8444 */ - color-1: rgb(151, 255, 117); - color-1: color(display-p3 0.63217 1 0.41255); + color-1: rgb(127, 255, 77); + color-1: color(display-p3 0.60436 1 0.34916); color-1: color-mix(in hsl, color(display-p3 0 1 0) 80%, yellow); } @@ -140,8 +140,8 @@ color-2: color-mix(in lab, red, green); /* rgb(143, 117, 0) */ - color-3: rgb(142, 117, 0); - color-3: color(display-p3 0.54586 0.46077 0); + color-3: rgb(143, 117, 0); + color-3: color(display-p3 0.55128 0.45926 0); color-3: color-mix(in lch, red, green); /* rgb(89, 122, 0) */ @@ -154,7 +154,7 @@ color-5: color-mix(in lab, red, green 90%); /* rgb(49, 128, 0) */ - color-6: rgb(54, 127, 0); + color-6: rgb(49, 128, 0); color-6: color(display-p3 0.2789 0.49535 0.06321); color-6: color-mix(in lch, red, green 90%); @@ -163,12 +163,12 @@ color-7: color-mix(in xyz, red 90%, green); /* rgb(237, 55, 0) */ - color-8: rgb(236, 56, 0); + color-8: rgb(237, 55, 0); color-8: color(display-p3 0.85526 0.28166 0.13354); color-8: color-mix(in lab, red 90%, green); /* rgb(235, 59, 0) */ - color-9: rgb(229, 68, 0); + color-9: rgb(235, 59, 0); color-9: color(display-p3 0.84845 0.29298 0.07064); color-9: color-mix(in lch, red 90%, green); } @@ -201,11 +201,11 @@ } .zero-alpha-cylindrical { - color-4: rgba(122, 0, 182, 0.65); - color-4: color(display-p3 0.4447 0 0.71665 / 0.65); + color-4: rgba(125, 0, 190, 0.65); + color-4: color(display-p3 0.44999 0 0.73423 / 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); + color-5: rgba(153, 0, 125, 0.65); + color-5: color(display-p3 0.5648 0 0.48884 / 0.65); color-5: color-mix(in lch, rgb(255 0 0 / 0), blue 65%); color-6: rgba(179, 0, 255, 0.65); color-6: color-mix(in hsl, rgb(255 0 0 / 0), blue 65%); diff --git a/plugins/postcss-color-mix-function/test/variables.expect.css b/plugins/postcss-color-mix-function/test/variables.expect.css index 7bc0a4232..bdc51e2c3 100644 --- a/plugins/postcss-color-mix-function/test/variables.expect.css +++ b/plugins/postcss-color-mix-function/test/variables.expect.css @@ -1,6 +1,6 @@ :root { - --firebrick: rgb(229, 68, 0); - --firebrick-a50: rgb(229, 68, 0); + --firebrick: rgb(235, 59, 0); + --firebrick-a50: rgb(235, 59, 0); --opacity-50: 50%; --firebrick-a50-var: color-mix(in lch, red, green var(--opacity-50)); diff --git a/plugins/postcss-color-mix-function/test/variables.preserve-true.expect.css b/plugins/postcss-color-mix-function/test/variables.preserve-true.expect.css index e47256a6b..93749f030 100644 --- a/plugins/postcss-color-mix-function/test/variables.preserve-true.expect.css +++ b/plugins/postcss-color-mix-function/test/variables.preserve-true.expect.css @@ -1,6 +1,6 @@ :root { - --firebrick: rgb(229, 68, 0); - --firebrick-a50: rgb(229, 68, 0); + --firebrick: rgb(235, 59, 0); + --firebrick-a50: rgb(235, 59, 0); --opacity-50: 50%; --firebrick-a50-var: color-mix(in lch, red, green var(--opacity-50)); diff --git a/plugins/postcss-contrast-color-function/README.md b/plugins/postcss-contrast-color-function/README.md index 437d4a6de..ccb11a49f 100644 --- a/plugins/postcss-contrast-color-function/README.md +++ b/plugins/postcss-contrast-color-function/README.md @@ -20,14 +20,14 @@ npm install @csstools/postcss-contrast-color-function --save-dev /* becomes */ .dynamic { - color: color(display-p3 0.15441 0 0.16001); + color: color(display-p3 0.16733 0 0.17585); color: contrast-color(oklch(82% 0.2 330)); }@supports not (color: contrast-color(red max)) {@media (prefers-contrast: more) {.dynamic { color: rgb(0, 0, 0); } } }@supports not (color: contrast-color(red max)) {@media (prefers-contrast: less) {.dynamic { - color: color(display-p3 0.29262 0 0.30192); + color: color(display-p3 0.30696 0 0.31938); } } } @@ -91,12 +91,12 @@ postcssContrastColorFunction({ preserve: false }) /* becomes */ .dynamic { - color: color(display-p3 0.15441 0 0.16001); + color: color(display-p3 0.16733 0 0.17585); }@media (prefers-contrast: more) {.dynamic { color: rgb(0, 0, 0); } }@media (prefers-contrast: less) {.dynamic { - color: color(display-p3 0.29262 0 0.30192); + color: color(display-p3 0.30696 0 0.31938); } } diff --git a/plugins/postcss-contrast-color-function/test/basic.expect.css b/plugins/postcss-contrast-color-function/test/basic.expect.css index 65c80dc4b..b4a602fcc 100644 --- a/plugins/postcss-contrast-color-function/test/basic.expect.css +++ b/plugins/postcss-contrast-color-function/test/basic.expect.css @@ -1,12 +1,12 @@ .dynamic { - color: color(display-p3 0.15487 0 0.15914); + color: color(display-p3 0.16781 0 0.17472); color: contrast-color(oklch(82.06% 0.2 330.35)); }@supports not (color: contrast-color(red max)) {@media (prefers-contrast: more) {.dynamic { color: rgb(0, 0, 0); } } }@supports not (color: contrast-color(red max)) {@media (prefers-contrast: less) {.dynamic { - color: color(display-p3 0.29338 0 0.30048); + color: color(display-p3 0.30767 0 0.31758); } } } @@ -17,7 +17,7 @@ } .both { - color: color-mix(in srgb, rgb(255, 255, 255), color(display-p3 0 0.11165 0.11567)); + color: color-mix(in srgb, rgb(255, 255, 255), color(display-p3 0 0.11433 0.11961)); color: color-mix(in srgb, contrast-color(blue max), contrast-color(cyan)); } @@ -32,7 +32,7 @@ @supports not (color: contrast-color(red max)) {@media (prefers-contrast: less) { .both { - color: color-mix(in srgb, rgb(255, 255, 255), color(display-p3 0 0.21781 0.22292)); + color: color-mix(in srgb, rgb(255, 255, 255), color(display-p3 0 0.22235 0.22932)); } } } @@ -49,7 +49,7 @@ } .dynamic-lime { - color: color(display-p3 0.00418 0.11802 0); + color: color(display-p3 0 0.12169 0); color: contrast-color(lime); } @@ -64,7 +64,7 @@ @supports not (color: contrast-color(red max)) {@media (prefers-contrast: less) { .dynamic-lime { - color: color(display-p3 0 0.23477 0); + color: color(display-p3 0 0.23535 0); } } } @@ -75,7 +75,7 @@ } .dynamic-darkgreen { - color: color(display-p3 0.81657 1 0.76626); + color: color(display-p3 0.77344 1 0.70604); color: contrast-color(darkgreen); } @@ -118,7 +118,7 @@ } .nested-dynamic { - color: color(display-p3 1 0.90229 0.91845); + color: color(display-p3 1 0.88169 0.90871); color: contrast-color(contrast-color(pink)); } @@ -133,7 +133,7 @@ @supports not (color: contrast-color(red max)) {@media (prefers-contrast: less) { .nested-dynamic { - color: color(display-p3 1 0.80594 0.83911); + color: color(display-p3 1 0.80372 0.83812); } } } diff --git a/plugins/postcss-contrast-color-function/test/examples/example.expect.css b/plugins/postcss-contrast-color-function/test/examples/example.expect.css index 2fb17cf37..d6c6b4cac 100644 --- a/plugins/postcss-contrast-color-function/test/examples/example.expect.css +++ b/plugins/postcss-contrast-color-function/test/examples/example.expect.css @@ -1,12 +1,12 @@ .dynamic { - color: color(display-p3 0.15441 0 0.16001); + color: color(display-p3 0.16733 0 0.17585); color: contrast-color(oklch(82% 0.2 330)); }@supports not (color: contrast-color(red max)) {@media (prefers-contrast: more) {.dynamic { color: rgb(0, 0, 0); } } }@supports not (color: contrast-color(red max)) {@media (prefers-contrast: less) {.dynamic { - color: color(display-p3 0.29262 0 0.30192); + color: color(display-p3 0.30696 0 0.31938); } } } diff --git a/plugins/postcss-contrast-color-function/test/examples/example.preserve-false.expect.css b/plugins/postcss-contrast-color-function/test/examples/example.preserve-false.expect.css index 1c403ea52..8f79b3e84 100644 --- a/plugins/postcss-contrast-color-function/test/examples/example.preserve-false.expect.css +++ b/plugins/postcss-contrast-color-function/test/examples/example.preserve-false.expect.css @@ -1,10 +1,10 @@ .dynamic { - color: color(display-p3 0.15441 0 0.16001); + color: color(display-p3 0.16733 0 0.17585); }@media (prefers-contrast: more) {.dynamic { color: rgb(0, 0, 0); } }@media (prefers-contrast: less) {.dynamic { - color: color(display-p3 0.29262 0 0.30192); + color: color(display-p3 0.30696 0 0.31938); } } diff --git a/plugins/postcss-contrast-color-function/test/variables.expect.css b/plugins/postcss-contrast-color-function/test/variables.expect.css index ab81570ac..85a46c854 100644 --- a/plugins/postcss-contrast-color-function/test/variables.expect.css +++ b/plugins/postcss-contrast-color-function/test/variables.expect.css @@ -1,5 +1,5 @@ .dynamic { - --color: color(display-p3 0.15487 0 0.15914); + --color: color(display-p3 0.16781 0 0.17472); } @supports (color: contrast-color(red max)) and (color: oklab(0% 0 0%)) { @@ -19,7 +19,7 @@ @supports not (color: contrast-color(red max)) { @media (prefers-contrast: less) {.dynamic { - --color: color(display-p3 0.29338 0 0.30048); + --color: color(display-p3 0.30767 0 0.31758); } } } @@ -35,7 +35,7 @@ } .both { - --color: color-mix(in srgb, rgb(255, 255, 255), color(display-p3 0 0.11165 0.11567)); + --color: color-mix(in srgb, rgb(255, 255, 255), color(display-p3 0 0.11433 0.11961)); } @supports (color: color-mix(in lch, red, blue)) and (color: contrast-color(red max)) { @@ -59,7 +59,7 @@ @media (prefers-contrast: less) { .both { - --color: color-mix(in srgb, rgb(255, 255, 255), color(display-p3 0 0.21781 0.22292)); + --color: color-mix(in srgb, rgb(255, 255, 255), color(display-p3 0 0.22235 0.22932)); } } } diff --git a/plugins/postcss-contrast-color-function/test/variables.preserve-false.expect.css b/plugins/postcss-contrast-color-function/test/variables.preserve-false.expect.css index 01377412e..1dbc709e3 100644 --- a/plugins/postcss-contrast-color-function/test/variables.preserve-false.expect.css +++ b/plugins/postcss-contrast-color-function/test/variables.preserve-false.expect.css @@ -1,10 +1,10 @@ .dynamic { - --color: color(display-p3 0.15487 0 0.15914); + --color: color(display-p3 0.16781 0 0.17472); }@media (prefers-contrast: more) {.dynamic { --color: rgb(0, 0, 0); } }@media (prefers-contrast: less) {.dynamic { - --color: color(display-p3 0.29338 0 0.30048); + --color: color(display-p3 0.30767 0 0.31758); } } @@ -13,7 +13,7 @@ } .both { - --color: color-mix(in srgb, rgb(255, 255, 255), color(display-p3 0 0.11165 0.11567)); + --color: color-mix(in srgb, rgb(255, 255, 255), color(display-p3 0 0.11433 0.11961)); } @media (prefers-contrast: more) { @@ -26,6 +26,6 @@ @media (prefers-contrast: less) { .both { - --color: color-mix(in srgb, rgb(255, 255, 255), color(display-p3 0 0.21781 0.22292)); + --color: color-mix(in srgb, rgb(255, 255, 255), color(display-p3 0 0.22235 0.22932)); } } diff --git a/plugins/postcss-gamut-mapping/README.md b/plugins/postcss-gamut-mapping/README.md index 874c5c896..cde77ecbf 100644 --- a/plugins/postcss-gamut-mapping/README.md +++ b/plugins/postcss-gamut-mapping/README.md @@ -27,8 +27,8 @@ p { p { background-color: oklch(80% 0.05 0.39 / 0.5); - color: rgba(50, 0, 20, 0.5); - border-color: rgb(0, 249, 66); + color: rgba(53, 0, 20, 0.5); + border-color: rgb(0, 251, 41); } @media (color-gamut: rec2020) { diff --git a/plugins/postcss-gamut-mapping/test/basic.expect.css b/plugins/postcss-gamut-mapping/test/basic.expect.css index 3d4387e7c..34d206dc9 100644 --- a/plugins/postcss-gamut-mapping/test/basic.expect.css +++ b/plugins/postcss-gamut-mapping/test/basic.expect.css @@ -1,6 +1,6 @@ :root { --a-color: oklch(40% 0.05 0.39 / var(--opacity-50)); - --b-color: rgba(138, 0, 67, var(--opacity-50)); + --b-color: rgba(139, 0, 67, var(--opacity-50)); } @media (color-gamut: rec2020) { @@ -18,11 +18,11 @@ color-6: oklch(60% 0.150 0); @supports (color: oklch(60% 0.1250 180)) { - color-7: rgb(0, 149, 131); - color-8: rgb(0, 149, 131); - color-9: rgb(0, 149, 131); - color-10: rgb(0, 149, 131); - color-11: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); + color-8: rgb(0, 152, 131); + color-9: rgb(0, 152, 131); + color-10: rgb(0, 152, 131); + color-11: rgb(0, 152, 131); } @media (color-gamut: p3) { @@ -74,7 +74,7 @@ .default-4 { /* Out p3 of gamut */ - color: rgb(253, 255, 253); + color: rgb(252, 255, 252); } @media (color-gamut: rec2020) { @@ -195,7 +195,7 @@ @supports (color: color(display-p3 0 1 0)) { .guarded-by-supports { - color: rgb(0, 249, 66); + color: rgb(0, 251, 41); } @media (color-gamut: p3) { diff --git a/plugins/postcss-gamut-mapping/test/examples/example.expect.css b/plugins/postcss-gamut-mapping/test/examples/example.expect.css index 49cd58612..f5e61783f 100644 --- a/plugins/postcss-gamut-mapping/test/examples/example.expect.css +++ b/plugins/postcss-gamut-mapping/test/examples/example.expect.css @@ -1,7 +1,7 @@ p { background-color: oklch(80% 0.05 0.39 / 0.5); - color: rgba(50, 0, 20, 0.5); - border-color: rgb(0, 249, 66); + color: rgba(53, 0, 20, 0.5); + border-color: rgb(0, 251, 41); } @media (color-gamut: rec2020) { diff --git a/plugins/postcss-lab-function/test/basic.display-p3-false.expect.css b/plugins/postcss-lab-function/test/basic.display-p3-false.expect.css index 9fc55ad8a..b96e913c8 100644 --- a/plugins/postcss-lab-function/test/basic.display-p3-false.expect.css +++ b/plugins/postcss-lab-function/test/basic.display-p3-false.expect.css @@ -16,11 +16,11 @@ color-5: rgba(179, 35, 35, 0.5); color-6: rgb(222, 105, 147); - color-7: rgb(0, 164, 142); - color-8: rgb(0, 164, 142); - color-9: rgb(0, 164, 142); - color-10: rgb(0, 164, 142); - color-11: rgb(0, 164, 142); + color-7: rgb(0, 166, 143); + color-8: rgb(0, 166, 143); + color-9: rgb(0, 166, 143); + color-10: rgb(0, 166, 143); + color-11: rgb(0, 166, 143); color-12: rgb(212, 118, 84); color-13: rgb(212, 118, 84); @@ -30,10 +30,10 @@ color-17: lch(60% 50 0.785398unknown); color-18: rgb(212, 118, 84); - color-20: rgb(0, 164, 142); - color-21: rgb(0, 164, 142); - color-22: rgb(0, 164, 142); - color-23: rgb(0, 164, 142); + color-20: rgb(0, 166, 143); + color-21: rgb(0, 166, 143); + color-22: rgb(0, 166, 143); + color-23: rgb(0, 166, 143); } .test-percentages { @@ -94,12 +94,12 @@ /* teal */ prop-2: rgb(0, 0, 0); /* teal */ - prop-3: rgb(0, 44, 45); + prop-3: rgb(0, 45, 46); } .test-multiple-colors { background-1: linear-gradient(rgb(97, 112, 56), rgb(212, 118, 84)); - background-2: linear-gradient(rgb(0, 123, 61), rgb(212, 118, 84)); + background-2: linear-gradient(rgb(0, 126, 53), rgb(212, 118, 84)); } .test-unparseable-lab-function { @@ -109,57 +109,57 @@ .test-gamut { /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B48%2C-53%2C12%5D%2C%5B58%2C-54%2C69%5D%5D */ /* out */ - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); /* out */ - prop-2: rgb(50, 160, 0); + prop-2: rgb(38, 161, 0); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B45%2C-13%2C29%5D%2C%5B77%2C33%2C97%5D%5D */ /* in */ prop-3: rgb(97, 112, 56); /* out */ - prop-4: rgb(255, 169, 30); + prop-4: rgb(255, 166, 0); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B76%2C-29%2C-23%5D%2C%5B16%2C-32%2C24%5D%5D */ /* in */ prop-5: rgb(85, 204, 229); /* out */ - prop-6: rgb(0, 47, 8); + prop-6: rgb(0, 50, 0); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B85%2C16%2C29%5D%2C%5B55%2C-42%2C58%5D%5D */ /* out */ prop-7: rgb(255, 201, 158); /* out */ - prop-8: rgb(71, 149, 0); + prop-8: rgb(70, 149, 0); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B87%2C-94%2C103%5D%2C%5B88%2C-9%2C62%5D%5D */ /* out */ - prop-9: rgb(0, 252, 0); + prop-9: rgb(0, 253, 0); /* in */ prop-10: rgb(231, 224, 96); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B69%2C-35%2C-39%5D%2C%5B68%2C61%2C39%5D%5D */ /* out */ - prop-11: rgb(0, 186, 229); + prop-11: rgb(0, 187, 234); /* out */ - prop-12: rgb(255, 122, 110); + prop-12: rgb(255, 117, 105); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B60%2C-28%2C74%5D%2C%5B65%2C81%2C-13%5D%5D */ /* out */ - prop-13: rgb(121, 156, 0); + prop-13: rgb(119, 157, 0); /* out */ - prop-14: rgb(255, 92, 182); + prop-14: rgb(255, 89, 183); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B60%2C-28%2C15%5D%2C%5B65%2C81%2C-11%5D%5D */ /* in */ prop-15: rgb(96, 158, 117); /* out */ - prop-16: rgb(255, 92, 179); + prop-16: rgb(255, 90, 179); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B78%2C-64%2C-44%5D%2C%5B76%2C81%2C-11%5D%5D */ /* out */ - prop-17: rgb(0, 214, 242); + prop-17: rgb(0, 214, 243); /* out */ - prop-18: rgb(255, 162, 204); + prop-18: rgb(255, 156, 205); } .test-wpt-lab { @@ -170,7 +170,7 @@ lab-005: rgb(27, 193, 169); lab-006: rgb(195, 169, 14); lab-007: rgb(33, 135, 237); - lab-008: rgb(0, 249, 66); + lab-008: rgb(0, 251, 41); } .test-wpt-lch { @@ -181,7 +181,7 @@ lch-005: rgb(27, 193, 169); lch-006: rgb(195, 169, 14); lch-007: rgb(33, 135, 237); - lch-008: rgb(0, 249, 66); + lch-008: rgb(0, 251, 41); } .manual_fallback { diff --git a/plugins/postcss-lab-function/test/basic.display-p3-false.preserve-true.expect.css b/plugins/postcss-lab-function/test/basic.display-p3-false.preserve-true.expect.css index a976f9ddd..fe87e81d2 100644 --- a/plugins/postcss-lab-function/test/basic.display-p3-false.preserve-true.expect.css +++ b/plugins/postcss-lab-function/test/basic.display-p3-false.preserve-true.expect.css @@ -28,16 +28,16 @@ color-6: rgb(222, 105, 147); color-6: lch(60% 50 0); - color-7: rgb(0, 164, 142); + color-7: rgb(0, 166, 143); color-7: lch(60% 50 180); - color-8: rgb(0, 164, 142); + color-8: rgb(0, 166, 143); color-8: lch(60% 50 180deg); - color-9: rgb(0, 164, 142); + color-9: rgb(0, 166, 143); color-9: lch(60% 50 0.5turn); - color-10: rgb(0, 164, 142); + color-10: rgb(0, 166, 143); color-10: lch(60% 50 200grad); - color-11: rgb(0, 164, 142); + color-11: rgb(0, 166, 143); color-11: lch(60% 50 3.14159rad); color-12: rgb(212, 118, 84); @@ -55,14 +55,14 @@ color-18: rgb(212, 118, 84); color-18: lch(60% 50 405); - color-20: rgb(0, 164, 142); + color-20: rgb(0, 166, 143); color-20: LCH(60% 50 180DEG); - color-21: rgb(0, 164, 142); + color-21: rgb(0, 166, 143); color-21: Lch(60% 50 0.5TURN); - color-22: rgb(0, 164, 142); + color-22: rgb(0, 166, 143); color-22: lCh(60% 50 200GRAD); - color-23: rgb(0, 164, 142); + color-23: rgb(0, 166, 143); color-23: lcH(60% 50 3.14159RAD); } @@ -155,14 +155,14 @@ prop-2: rgb(0, 0, 0); prop-2: lch(0% 210 285); /* teal */ - prop-3: rgb(0, 44, 45); + prop-3: rgb(0, 45, 46); prop-3: lch(5% 210 285); } .test-multiple-colors { background-1: linear-gradient(rgb(97, 112, 56), rgb(212, 118, 84)); background-1: linear-gradient(lab(45% -13 29), lch(60% 50 45deg)); - background-2: linear-gradient(rgb(0, 123, 61), rgb(212, 118, 84)); + background-2: linear-gradient(rgb(0, 126, 53), rgb(212, 118, 84)); background-2: linear-gradient(lab(45% -50 29), lch(60% 50 45deg)); } @@ -173,10 +173,10 @@ .test-gamut { /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B48%2C-53%2C12%5D%2C%5B58%2C-54%2C69%5D%5D */ /* out */ - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-1: lab(48% -53 12); /* out */ - prop-2: rgb(50, 160, 0); + prop-2: rgb(38, 161, 0); prop-2: lab(58% -54 69); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B45%2C-13%2C29%5D%2C%5B77%2C33%2C97%5D%5D */ @@ -184,7 +184,7 @@ prop-3: rgb(97, 112, 56); prop-3: lab(45% -13 29); /* out */ - prop-4: rgb(255, 169, 30); + prop-4: rgb(255, 166, 0); prop-4: lab(77% 33 97); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B76%2C-29%2C-23%5D%2C%5B16%2C-32%2C24%5D%5D */ @@ -192,7 +192,7 @@ prop-5: rgb(85, 204, 229); prop-5: lab(76% -29 -23); /* out */ - prop-6: rgb(0, 47, 8); + prop-6: rgb(0, 50, 0); prop-6: lab(16% -32 24); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B85%2C16%2C29%5D%2C%5B55%2C-42%2C58%5D%5D */ @@ -200,12 +200,12 @@ prop-7: rgb(255, 201, 158); prop-7: lab(85% 16 29); /* out */ - prop-8: rgb(71, 149, 0); + prop-8: rgb(70, 149, 0); prop-8: lab(55% -42 58); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B87%2C-94%2C103%5D%2C%5B88%2C-9%2C62%5D%5D */ /* out */ - prop-9: rgb(0, 252, 0); + prop-9: rgb(0, 253, 0); prop-9: lab(87% -94 103); /* in */ prop-10: rgb(231, 224, 96); @@ -213,18 +213,18 @@ /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B69%2C-35%2C-39%5D%2C%5B68%2C61%2C39%5D%5D */ /* out */ - prop-11: rgb(0, 186, 229); + prop-11: rgb(0, 187, 234); prop-11: lab(69% -35 -39); /* out */ - prop-12: rgb(255, 122, 110); + prop-12: rgb(255, 117, 105); prop-12: lab(68% 61 39); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B60%2C-28%2C74%5D%2C%5B65%2C81%2C-13%5D%5D */ /* out */ - prop-13: rgb(121, 156, 0); + prop-13: rgb(119, 157, 0); prop-13: lab(60% -28 74); /* out */ - prop-14: rgb(255, 92, 182); + prop-14: rgb(255, 89, 183); prop-14: lab(65% 81 -13); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B60%2C-28%2C15%5D%2C%5B65%2C81%2C-11%5D%5D */ @@ -232,15 +232,15 @@ prop-15: rgb(96, 158, 117); prop-15: lab(60% -28 15); /* out */ - prop-16: rgb(255, 92, 179); + prop-16: rgb(255, 90, 179); prop-16: lab(65% 81 -11); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B78%2C-64%2C-44%5D%2C%5B76%2C81%2C-11%5D%5D */ /* out */ - prop-17: rgb(0, 214, 242); + prop-17: rgb(0, 214, 243); prop-17: lab(78% -64 -44); /* out */ - prop-18: rgb(255, 162, 204); + prop-18: rgb(255, 156, 205); prop-18: lab(76% 81 -11); } @@ -259,7 +259,7 @@ lab-006: lab(70% 0 70); lab-007: rgb(33, 135, 237); lab-007: lab(55% 0 -60); - lab-008: rgb(0, 249, 66); + lab-008: rgb(0, 251, 41); lab-008: lab(86.6146% -106.5599 102.8717); } @@ -278,7 +278,7 @@ lch-006: lch(70% 70 90); lch-007: rgb(33, 135, 237); lch-007: lch(55% 60 270); - lch-008: rgb(0, 249, 66); + lch-008: rgb(0, 251, 41); lch-008: lch(86.6146% 148.1135 136.0089); } diff --git a/plugins/postcss-lab-function/test/basic.expect.css b/plugins/postcss-lab-function/test/basic.expect.css index fc8d330c4..5fb4698b6 100644 --- a/plugins/postcss-lab-function/test/basic.expect.css +++ b/plugins/postcss-lab-function/test/basic.expect.css @@ -16,16 +16,16 @@ color-5: rgba(179, 35, 35, 0.5); color-6: rgb(222, 105, 147); - color-7: rgb(0, 164, 142); + color-7: rgb(0, 166, 143); color-7: color(display-p3 0.17545 0.64269 0.56213); - color-8: rgb(0, 164, 142); + color-8: rgb(0, 166, 143); color-8: color(display-p3 0.17545 0.64269 0.56213); - color-9: rgb(0, 164, 142); + color-9: rgb(0, 166, 143); color-9: color(display-p3 0.17545 0.64269 0.56213); - color-10: rgb(0, 164, 142); + color-10: rgb(0, 166, 143); color-10: color(display-p3 0.17545 0.64269 0.56213); - color-11: rgb(0, 164, 142); + color-11: rgb(0, 166, 143); color-11: color(display-p3 0.17545 0.64269 0.56213); color-12: rgb(212, 118, 84); @@ -36,14 +36,14 @@ color-17: lch(60% 50 0.785398unknown); color-18: rgb(212, 118, 84); - color-20: rgb(0, 164, 142); + color-20: rgb(0, 166, 143); color-20: color(display-p3 0.17545 0.64269 0.56213); - color-21: rgb(0, 164, 142); + color-21: rgb(0, 166, 143); color-21: color(display-p3 0.17545 0.64269 0.56213); - color-22: rgb(0, 164, 142); + color-22: rgb(0, 166, 143); color-22: color(display-p3 0.17545 0.64269 0.56213); - color-23: rgb(0, 164, 142); + color-23: rgb(0, 166, 143); color-23: color(display-p3 0.17545 0.64269 0.56213); } @@ -106,13 +106,13 @@ /* teal */ prop-2: rgb(0, 0, 0); /* teal */ - prop-3: rgb(0, 44, 45); - prop-3: color(display-p3 0 0.17286 0.18189); + prop-3: rgb(0, 45, 46); + prop-3: color(display-p3 0 0.17675 0.18819); } .test-multiple-colors { background-1: linear-gradient(rgb(97, 112, 56), rgb(212, 118, 84)); - background-2: linear-gradient(rgb(0, 123, 61), rgb(212, 118, 84)); + background-2: linear-gradient(rgb(0, 126, 53), rgb(212, 118, 84)); background-2: linear-gradient(color(display-p3 0.1379 0.48408 0.24136), rgb(212, 118, 84)); } @@ -123,24 +123,24 @@ .test-gamut { /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B48%2C-53%2C12%5D%2C%5B58%2C-54%2C69%5D%5D */ /* out */ - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-1: color(display-p3 0 0.51872 0.36985); /* out */ - prop-2: rgb(50, 160, 0); + prop-2: rgb(38, 161, 0); prop-2: color(display-p3 0.31275 0.62335 0.08647); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B45%2C-13%2C29%5D%2C%5B77%2C33%2C97%5D%5D */ /* in */ prop-3: rgb(97, 112, 56); /* out */ - prop-4: rgb(255, 169, 30); + prop-4: rgb(255, 166, 0); prop-4: color(display-p3 0.99733 0.66278 0.12085); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B76%2C-29%2C-23%5D%2C%5B16%2C-32%2C24%5D%5D */ /* in */ prop-5: rgb(85, 204, 229); /* out */ - prop-6: rgb(0, 47, 8); + prop-6: rgb(0, 50, 0); prop-6: color(display-p3 0.00652 0.18999 0.01056); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B85%2C16%2C29%5D%2C%5B55%2C-42%2C58%5D%5D */ @@ -148,46 +148,46 @@ prop-7: rgb(255, 201, 158); prop-7: color(display-p3 0.96684 0.79482 0.64336); /* out */ - prop-8: rgb(71, 149, 0); + prop-8: rgb(70, 149, 0); prop-8: color(display-p3 0.35483 0.57788 0.15007); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B87%2C-94%2C103%5D%2C%5B88%2C-9%2C62%5D%5D */ /* out */ - prop-9: rgb(0, 252, 0); + prop-9: rgb(0, 253, 0); prop-9: color(display-p3 0.32231 0.99185 0.02929); /* in */ prop-10: rgb(231, 224, 96); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B69%2C-35%2C-39%5D%2C%5B68%2C61%2C39%5D%5D */ /* out */ - prop-11: rgb(0, 186, 229); + prop-11: rgb(0, 187, 234); prop-11: color(display-p3 0.16541 0.72332 0.91352); /* out */ - prop-12: rgb(255, 122, 110); + prop-12: rgb(255, 117, 105); prop-12: color(display-p3 0.99104 0.47662 0.41939); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B60%2C-28%2C74%5D%2C%5B65%2C81%2C-13%5D%5D */ /* out */ - prop-13: rgb(121, 156, 0); + prop-13: rgb(119, 157, 0); prop-13: color(display-p3 0.49844 0.61099 0.07831); /* out */ - prop-14: rgb(255, 92, 182); + prop-14: rgb(255, 89, 183); prop-14: color(display-p3 0.99687 0.35134 0.71095); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B60%2C-28%2C15%5D%2C%5B65%2C81%2C-11%5D%5D */ /* in */ prop-15: rgb(96, 158, 117); /* out */ - prop-16: rgb(255, 92, 179); + prop-16: rgb(255, 90, 179); prop-16: color(display-p3 0.99937 0.35096 0.69833); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B78%2C-64%2C-44%5D%2C%5B76%2C81%2C-11%5D%5D */ /* out */ - prop-17: rgb(0, 214, 242); - prop-17: color(display-p3 0 0.83825 0.97157); + prop-17: rgb(0, 214, 243); + prop-17: color(display-p3 0 0.84595 0.99517); /* out */ - prop-18: rgb(255, 162, 204); - prop-18: color(display-p3 1 0.61552 0.80005); + prop-18: rgb(255, 156, 205); + prop-18: color(display-p3 1 0.58597 0.80437); } .test-wpt-lab { @@ -199,8 +199,8 @@ lab-005: rgb(27, 193, 169); lab-006: rgb(195, 169, 14); lab-007: rgb(33, 135, 237); - lab-008: rgb(0, 249, 66); - lab-008: color(display-p3 0 1 0.00064); + lab-008: rgb(0, 251, 41); + lab-008: color(display-p3 0 1 0); } .test-wpt-lch { @@ -212,8 +212,8 @@ lch-005: rgb(27, 193, 169); lch-006: rgb(195, 169, 14); lch-007: rgb(33, 135, 237); - lch-008: rgb(0, 249, 66); - lch-008: color(display-p3 0 1 0.00064); + lch-008: rgb(0, 251, 41); + lch-008: color(display-p3 0 1 0); } .manual_fallback { diff --git a/plugins/postcss-lab-function/test/basic.preserve-true.expect.css b/plugins/postcss-lab-function/test/basic.preserve-true.expect.css index 7eaca1731..06e2c515e 100644 --- a/plugins/postcss-lab-function/test/basic.preserve-true.expect.css +++ b/plugins/postcss-lab-function/test/basic.preserve-true.expect.css @@ -28,21 +28,21 @@ color-6: rgb(222, 105, 147); color-6: lch(60% 50 0); - color-7: rgb(0, 164, 142); + color-7: rgb(0, 166, 143); color-7: color(display-p3 0.17545 0.64269 0.56213); color-7: lch(60% 50 180); - color-8: rgb(0, 164, 142); + color-8: rgb(0, 166, 143); color-8: color(display-p3 0.17545 0.64269 0.56213); color-8: lch(60% 50 180deg); - color-9: rgb(0, 164, 142); + color-9: rgb(0, 166, 143); color-9: color(display-p3 0.17545 0.64269 0.56213); color-9: lch(60% 50 0.5turn); - color-10: rgb(0, 164, 142); + color-10: rgb(0, 166, 143); color-10: color(display-p3 0.17545 0.64269 0.56213); color-10: lch(60% 50 200grad); - color-11: rgb(0, 164, 142); + color-11: rgb(0, 166, 143); color-11: color(display-p3 0.17545 0.64269 0.56213); color-11: lch(60% 50 3.14159rad); @@ -61,18 +61,18 @@ color-18: rgb(212, 118, 84); color-18: lch(60% 50 405); - color-20: rgb(0, 164, 142); + color-20: rgb(0, 166, 143); color-20: color(display-p3 0.17545 0.64269 0.56213); color-20: LCH(60% 50 180DEG); - color-21: rgb(0, 164, 142); + color-21: rgb(0, 166, 143); color-21: color(display-p3 0.17545 0.64269 0.56213); color-21: Lch(60% 50 0.5TURN); - color-22: rgb(0, 164, 142); + color-22: rgb(0, 166, 143); color-22: color(display-p3 0.17545 0.64269 0.56213); color-22: lCh(60% 50 200GRAD); - color-23: rgb(0, 164, 142); + color-23: rgb(0, 166, 143); color-23: color(display-p3 0.17545 0.64269 0.56213); color-23: lcH(60% 50 3.14159RAD); } @@ -167,15 +167,15 @@ prop-2: rgb(0, 0, 0); prop-2: lch(0% 210 285); /* teal */ - prop-3: rgb(0, 44, 45); - prop-3: color(display-p3 0 0.17286 0.18189); + prop-3: rgb(0, 45, 46); + prop-3: color(display-p3 0 0.17675 0.18819); prop-3: lch(5% 210 285); } .test-multiple-colors { background-1: linear-gradient(rgb(97, 112, 56), rgb(212, 118, 84)); background-1: linear-gradient(lab(45% -13 29), lch(60% 50 45deg)); - background-2: linear-gradient(rgb(0, 123, 61), rgb(212, 118, 84)); + background-2: linear-gradient(rgb(0, 126, 53), rgb(212, 118, 84)); background-2: linear-gradient(color(display-p3 0.1379 0.48408 0.24136), rgb(212, 118, 84)); background-2: linear-gradient(lab(45% -50 29), lch(60% 50 45deg)); } @@ -187,11 +187,11 @@ .test-gamut { /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B48%2C-53%2C12%5D%2C%5B58%2C-54%2C69%5D%5D */ /* out */ - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-1: color(display-p3 0 0.51872 0.36985); prop-1: lab(48% -53 12); /* out */ - prop-2: rgb(50, 160, 0); + prop-2: rgb(38, 161, 0); prop-2: color(display-p3 0.31275 0.62335 0.08647); prop-2: lab(58% -54 69); @@ -200,7 +200,7 @@ prop-3: rgb(97, 112, 56); prop-3: lab(45% -13 29); /* out */ - prop-4: rgb(255, 169, 30); + prop-4: rgb(255, 166, 0); prop-4: color(display-p3 0.99733 0.66278 0.12085); prop-4: lab(77% 33 97); @@ -209,7 +209,7 @@ prop-5: rgb(85, 204, 229); prop-5: lab(76% -29 -23); /* out */ - prop-6: rgb(0, 47, 8); + prop-6: rgb(0, 50, 0); prop-6: color(display-p3 0.00652 0.18999 0.01056); prop-6: lab(16% -32 24); @@ -219,13 +219,13 @@ prop-7: color(display-p3 0.96684 0.79482 0.64336); prop-7: lab(85% 16 29); /* out */ - prop-8: rgb(71, 149, 0); + prop-8: rgb(70, 149, 0); prop-8: color(display-p3 0.35483 0.57788 0.15007); prop-8: lab(55% -42 58); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B87%2C-94%2C103%5D%2C%5B88%2C-9%2C62%5D%5D */ /* out */ - prop-9: rgb(0, 252, 0); + prop-9: rgb(0, 253, 0); prop-9: color(display-p3 0.32231 0.99185 0.02929); prop-9: lab(87% -94 103); /* in */ @@ -234,21 +234,21 @@ /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B69%2C-35%2C-39%5D%2C%5B68%2C61%2C39%5D%5D */ /* out */ - prop-11: rgb(0, 186, 229); + prop-11: rgb(0, 187, 234); prop-11: color(display-p3 0.16541 0.72332 0.91352); prop-11: lab(69% -35 -39); /* out */ - prop-12: rgb(255, 122, 110); + prop-12: rgb(255, 117, 105); prop-12: color(display-p3 0.99104 0.47662 0.41939); prop-12: lab(68% 61 39); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B60%2C-28%2C74%5D%2C%5B65%2C81%2C-13%5D%5D */ /* out */ - prop-13: rgb(121, 156, 0); + prop-13: rgb(119, 157, 0); prop-13: color(display-p3 0.49844 0.61099 0.07831); prop-13: lab(60% -28 74); /* out */ - prop-14: rgb(255, 92, 182); + prop-14: rgb(255, 89, 183); prop-14: color(display-p3 0.99687 0.35134 0.71095); prop-14: lab(65% 81 -13); @@ -257,18 +257,18 @@ prop-15: rgb(96, 158, 117); prop-15: lab(60% -28 15); /* out */ - prop-16: rgb(255, 92, 179); + prop-16: rgb(255, 90, 179); prop-16: color(display-p3 0.99937 0.35096 0.69833); prop-16: lab(65% 81 -11); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B78%2C-64%2C-44%5D%2C%5B76%2C81%2C-11%5D%5D */ /* out */ - prop-17: rgb(0, 214, 242); - prop-17: color(display-p3 0 0.83825 0.97157); + prop-17: rgb(0, 214, 243); + prop-17: color(display-p3 0 0.84595 0.99517); prop-17: lab(78% -64 -44); /* out */ - prop-18: rgb(255, 162, 204); - prop-18: color(display-p3 1 0.61552 0.80005); + prop-18: rgb(255, 156, 205); + prop-18: color(display-p3 1 0.58597 0.80437); prop-18: lab(76% 81 -11); } @@ -288,8 +288,8 @@ lab-006: lab(70% 0 70); lab-007: rgb(33, 135, 237); lab-007: lab(55% 0 -60); - lab-008: rgb(0, 249, 66); - lab-008: color(display-p3 0 1 0.00064); + lab-008: rgb(0, 251, 41); + lab-008: color(display-p3 0 1 0); lab-008: lab(86.6146% -106.5599 102.8717); } @@ -309,8 +309,8 @@ lch-006: lch(70% 70 90); lch-007: rgb(33, 135, 237); lch-007: lch(55% 60 270); - lch-008: rgb(0, 249, 66); - lch-008: color(display-p3 0 1 0.00064); + lch-008: rgb(0, 251, 41); + lch-008: color(display-p3 0 1 0); lch-008: lch(86.6146% 148.1135 136.0089); } diff --git a/plugins/postcss-lab-function/test/basic.with-cloned-rules.expect.css b/plugins/postcss-lab-function/test/basic.with-cloned-rules.expect.css index 041528c2e..b8fb0ba96 100644 --- a/plugins/postcss-lab-function/test/basic.with-cloned-rules.expect.css +++ b/plugins/postcss-lab-function/test/basic.with-cloned-rules.expect.css @@ -28,21 +28,21 @@ color-6: rgb(222, 105, 147); color-6: lch(60% 50 0); - color-7: rgb(0, 164, 142); + color-7: rgb(0, 166, 143); color-7: color(display-p3 0.17545 0.64269 0.56213); color-7: lch(60% 50 180); - color-8: rgb(0, 164, 142); + color-8: rgb(0, 166, 143); color-8: color(display-p3 0.17545 0.64269 0.56213); color-8: lch(60% 50 180deg); - color-9: rgb(0, 164, 142); + color-9: rgb(0, 166, 143); color-9: color(display-p3 0.17545 0.64269 0.56213); color-9: lch(60% 50 0.5turn); - color-10: rgb(0, 164, 142); + color-10: rgb(0, 166, 143); color-10: color(display-p3 0.17545 0.64269 0.56213); color-10: lch(60% 50 200grad); - color-11: rgb(0, 164, 142); + color-11: rgb(0, 166, 143); color-11: color(display-p3 0.17545 0.64269 0.56213); color-11: lch(60% 50 3.14159rad); @@ -61,18 +61,18 @@ color-18: rgb(212, 118, 84); color-18: lch(60% 50 405); - color-20: rgb(0, 164, 142); + color-20: rgb(0, 166, 143); color-20: color(display-p3 0.17545 0.64269 0.56213); color-20: LCH(60% 50 180DEG); - color-21: rgb(0, 164, 142); + color-21: rgb(0, 166, 143); color-21: color(display-p3 0.17545 0.64269 0.56213); color-21: Lch(60% 50 0.5TURN); - color-22: rgb(0, 164, 142); + color-22: rgb(0, 166, 143); color-22: color(display-p3 0.17545 0.64269 0.56213); color-22: lCh(60% 50 200GRAD); - color-23: rgb(0, 164, 142); + color-23: rgb(0, 166, 143); color-23: color(display-p3 0.17545 0.64269 0.56213); color-23: lcH(60% 50 3.14159RAD); } @@ -167,15 +167,15 @@ prop-2: rgb(0, 0, 0); prop-2: lch(0% 210 285); /* teal */ - prop-3: rgb(0, 44, 45); - prop-3: color(display-p3 0 0.17286 0.18189); + prop-3: rgb(0, 45, 46); + prop-3: color(display-p3 0 0.17675 0.18819); prop-3: lch(5% 210 285); } .test-multiple-colors { background-1: linear-gradient(rgb(97, 112, 56), rgb(212, 118, 84)); background-1: linear-gradient(lab(45% -13 29), lch(60% 50 45deg)); - background-2: linear-gradient(rgb(0, 123, 61), rgb(212, 118, 84)); + background-2: linear-gradient(rgb(0, 126, 53), rgb(212, 118, 84)); background-2: linear-gradient(color(display-p3 0.1379 0.48408 0.24136), rgb(212, 118, 84)); background-2: linear-gradient(lab(45% -50 29), lch(60% 50 45deg)); } @@ -187,11 +187,11 @@ .test-gamut { /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B48%2C-53%2C12%5D%2C%5B58%2C-54%2C69%5D%5D */ /* out */ - prop-1: rgb(0, 129, 96); + prop-1: rgb(0, 132, 94); prop-1: color(display-p3 0 0.51872 0.36985); prop-1: lab(48% -53 12); /* out */ - prop-2: rgb(50, 160, 0); + prop-2: rgb(38, 161, 0); prop-2: color(display-p3 0.31275 0.62335 0.08647); prop-2: lab(58% -54 69); @@ -200,7 +200,7 @@ prop-3: rgb(97, 112, 56); prop-3: lab(45% -13 29); /* out */ - prop-4: rgb(255, 169, 30); + prop-4: rgb(255, 166, 0); prop-4: color(display-p3 0.99733 0.66278 0.12085); prop-4: lab(77% 33 97); @@ -209,7 +209,7 @@ prop-5: rgb(85, 204, 229); prop-5: lab(76% -29 -23); /* out */ - prop-6: rgb(0, 47, 8); + prop-6: rgb(0, 50, 0); prop-6: color(display-p3 0.00652 0.18999 0.01056); prop-6: lab(16% -32 24); @@ -219,13 +219,13 @@ prop-7: color(display-p3 0.96684 0.79482 0.64336); prop-7: lab(85% 16 29); /* out */ - prop-8: rgb(71, 149, 0); + prop-8: rgb(70, 149, 0); prop-8: color(display-p3 0.35483 0.57788 0.15007); prop-8: lab(55% -42 58); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B87%2C-94%2C103%5D%2C%5B88%2C-9%2C62%5D%5D */ /* out */ - prop-9: rgb(0, 252, 0); + prop-9: rgb(0, 253, 0); prop-9: color(display-p3 0.32231 0.99185 0.02929); prop-9: lab(87% -94 103); /* in */ @@ -234,21 +234,21 @@ /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B69%2C-35%2C-39%5D%2C%5B68%2C61%2C39%5D%5D */ /* out */ - prop-11: rgb(0, 186, 229); + prop-11: rgb(0, 187, 234); prop-11: color(display-p3 0.16541 0.72332 0.91352); prop-11: lab(69% -35 -39); /* out */ - prop-12: rgb(255, 122, 110); + prop-12: rgb(255, 117, 105); prop-12: color(display-p3 0.99104 0.47662 0.41939); prop-12: lab(68% 61 39); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B60%2C-28%2C74%5D%2C%5B65%2C81%2C-13%5D%5D */ /* out */ - prop-13: rgb(121, 156, 0); + prop-13: rgb(119, 157, 0); prop-13: color(display-p3 0.49844 0.61099 0.07831); prop-13: lab(60% -28 74); /* out */ - prop-14: rgb(255, 92, 182); + prop-14: rgb(255, 89, 183); prop-14: color(display-p3 0.99687 0.35134 0.71095); prop-14: lab(65% 81 -13); @@ -257,18 +257,18 @@ prop-15: rgb(96, 158, 117); prop-15: lab(60% -28 15); /* out */ - prop-16: rgb(255, 92, 179); + prop-16: rgb(255, 90, 179); prop-16: color(display-p3 0.99937 0.35096 0.69833); prop-16: lab(65% 81 -11); /* https://romainmenke.github.io/lab-lch-display-p3/lab-interactive-b.html#%5B%5B78%2C-64%2C-44%5D%2C%5B76%2C81%2C-11%5D%5D */ /* out */ - prop-17: rgb(0, 214, 242); - prop-17: color(display-p3 0 0.83825 0.97157); + prop-17: rgb(0, 214, 243); + prop-17: color(display-p3 0 0.84595 0.99517); prop-17: lab(78% -64 -44); /* out */ - prop-18: rgb(255, 162, 204); - prop-18: color(display-p3 1 0.61552 0.80005); + prop-18: rgb(255, 156, 205); + prop-18: color(display-p3 1 0.58597 0.80437); prop-18: lab(76% 81 -11); } @@ -288,8 +288,8 @@ lab-006: lab(70% 0 70); lab-007: rgb(33, 135, 237); lab-007: lab(55% 0 -60); - lab-008: rgb(0, 249, 66); - lab-008: color(display-p3 0 1 0.00064); + lab-008: rgb(0, 251, 41); + lab-008: color(display-p3 0 1 0); lab-008: lab(86.6146% -106.5599 102.8717); } @@ -309,8 +309,8 @@ lch-006: lch(70% 70 90); lch-007: rgb(33, 135, 237); lch-007: lch(55% 60 270); - lch-008: rgb(0, 249, 66); - lch-008: color(display-p3 0 1 0.00064); + lch-008: rgb(0, 251, 41); + lch-008: color(display-p3 0 1 0); lch-008: lch(86.6146% 148.1135 136.0089); } diff --git a/plugins/postcss-lab-function/test/variables.display-p3-false.expect.css b/plugins/postcss-lab-function/test/variables.display-p3-false.expect.css index 251a7f683..ead4bb30b 100644 --- a/plugins/postcss-lab-function/test/variables.display-p3-false.expect.css +++ b/plugins/postcss-lab-function/test/variables.display-p3-false.expect.css @@ -1,6 +1,6 @@ :root { - --firebrick: rgb(189, 0, 48); - --firebrick-a50: rgba(189, 0, 27, 0.5); + --firebrick: rgb(195, 0, 42); + --firebrick-a50: rgba(190, 0, 25, 0.5); --opacity-50: 0.5; --firebrick-a50-var: lch(40% 8034.5 / var(--opacity-50)); diff --git a/plugins/postcss-lab-function/test/variables.display-p3-false.preserve-true.expect.css b/plugins/postcss-lab-function/test/variables.display-p3-false.preserve-true.expect.css index 0ea077124..82540185b 100644 --- a/plugins/postcss-lab-function/test/variables.display-p3-false.preserve-true.expect.css +++ b/plugins/postcss-lab-function/test/variables.display-p3-false.preserve-true.expect.css @@ -1,6 +1,6 @@ :root { - --firebrick: rgb(189, 0, 48); - --firebrick-a50: rgba(189, 0, 27, 0.5); + --firebrick: rgb(195, 0, 42); + --firebrick-a50: rgba(190, 0, 25, 0.5); --opacity-50: 0.5; --firebrick-a50-var: lch(40% 8034.5 / var(--opacity-50)); diff --git a/plugins/postcss-lab-function/test/variables.expect.css b/plugins/postcss-lab-function/test/variables.expect.css index b88a6523b..9d16b00a6 100644 --- a/plugins/postcss-lab-function/test/variables.expect.css +++ b/plugins/postcss-lab-function/test/variables.expect.css @@ -1,6 +1,6 @@ :root { - --firebrick: rgb(189, 0, 48); - --firebrick-a50: rgba(189, 0, 27, 0.5); + --firebrick: rgb(195, 0, 42); + --firebrick-a50: rgba(190, 0, 25, 0.5); --opacity-50: 0.5; --firebrick-a50-var: lch(40% 8034.5 / var(--opacity-50)); @@ -11,7 +11,7 @@ @supports (color: color(display-p3 0 0 0%)) { :root { - --firebrick: color(display-p3 0.70967 0 0.17938); + --firebrick: color(display-p3 0.71393 0 0.17506); --firebrick-a50: color(display-p3 0.68093 0.12342 0.14054 / 0.5); } } diff --git a/plugins/postcss-lab-function/test/variables.preserve-true.expect.css b/plugins/postcss-lab-function/test/variables.preserve-true.expect.css index 7294a3acf..bdfab0d29 100644 --- a/plugins/postcss-lab-function/test/variables.preserve-true.expect.css +++ b/plugins/postcss-lab-function/test/variables.preserve-true.expect.css @@ -1,6 +1,6 @@ :root { - --firebrick: rgb(189, 0, 48); - --firebrick-a50: rgba(189, 0, 27, 0.5); + --firebrick: rgb(195, 0, 42); + --firebrick-a50: rgba(190, 0, 25, 0.5); --opacity-50: 0.5; --firebrick-a50-var: lch(40% 8034.5 / var(--opacity-50)); @@ -11,7 +11,7 @@ @supports (color: color(display-p3 0 0 0%)) { :root { - --firebrick: color(display-p3 0.70967 0 0.17938); + --firebrick: color(display-p3 0.71393 0 0.17506); } } diff --git a/plugins/postcss-oklab-function/test/basic.expect.css b/plugins/postcss-oklab-function/test/basic.expect.css index 5643b79cc..c08011e28 100644 --- a/plugins/postcss-oklab-function/test/basic.expect.css +++ b/plugins/postcss-oklab-function/test/basic.expect.css @@ -21,16 +21,16 @@ color-5: rgba(126, 37, 15, 0.5); color-6: rgb(197, 84, 124); - color-7: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); color-7: color(display-p3 0.19244 0.58461 0.51559); - color-8: rgb(0, 149, 131); + color-8: rgb(0, 152, 131); color-8: color(display-p3 0.19244 0.58461 0.51559); - color-9: rgb(0, 149, 131); + color-9: rgb(0, 152, 131); color-9: color(display-p3 0.19244 0.58461 0.51559); - color-10: rgb(0, 149, 131); + color-10: rgb(0, 152, 131); color-10: color(display-p3 0.19244 0.58461 0.51559); - color-11: rgb(0, 149, 131); + color-11: rgb(0, 152, 131); color-11: color(display-p3 0.19244 0.58461 0.51559); color-12: rgb(188, 101, 59); @@ -41,16 +41,16 @@ color-17: oklch(60% 0.1250 0.785398unknown); color-18: rgb(188, 101, 59); - color-20: rgb(0, 149, 131); + color-20: rgb(0, 152, 131); color-20: color(display-p3 0.19244 0.58461 0.51559); - color-21: rgb(0, 149, 131); + color-21: rgb(0, 152, 131); color-21: color(display-p3 0.19244 0.58461 0.51559); - color-22: rgb(0, 149, 131); + color-22: rgb(0, 152, 131); color-22: color(display-p3 0.19244 0.58461 0.51559); - color-23: rgb(0, 149, 131); + color-23: rgb(0, 152, 131); color-23: color(display-p3 0.19244 0.58461 0.51559); - color-24: rgb(0, 149, 131); + color-24: rgb(0, 152, 131); color-24: color(display-p3 0.19244 0.58461 0.51559); } @@ -159,8 +159,8 @@ .test-multiple-colors { background-1: linear-gradient(rgb(94, 83, 77), rgb(136, 126, 121)); - background-2: linear-gradient(rgb(161, 0, 74), rgb(136, 126, 121)); - background-2: linear-gradient(color(display-p3 0.59283 0 0.2865), rgb(136, 126, 121)); + background-2: linear-gradient(rgb(164, 0, 74), rgb(136, 126, 121)); + background-2: linear-gradient(color(display-p3 0.60733 0 0.28326), rgb(136, 126, 121)); } .test-unparseable-lab-function { @@ -183,9 +183,9 @@ .test-blue-teal { /* PR 0.18049383596973165, 0.5091259470889729, 0.5339002129941043 */ - color-1: rgb(0, 131, 136); + color-1: rgb(0, 132, 138); color-1: color(display-p3 0.18049 0.50913 0.5339); - color-2: rgb(0, 131, 136); + color-2: rgb(0, 132, 138); color-2: color(display-p3 0.18049 0.50913 0.5339); } @@ -196,8 +196,8 @@ } .test-css-color-5-interop { - color-1: oklab(from rgb(141, 0, 0) l a b); - color-1: oklab(from color(display-p3 0.50566 0.0781 0) l a b); - color-2: oklch(from rgb(130, 31, 0) l c h); - color-2: oklch(from color(display-p3 0.48896 0.1211 0) l c h); + color-1: oklab(from rgb(143, 0, 0) l a b); + color-1: oklab(from color(display-p3 0.52884 0 0) l a b); + color-2: oklch(from rgb(136, 19, 0) l c h); + color-2: oklch(from color(display-p3 0.50449 0.08687 0) l c h); } diff --git a/plugins/postcss-oklab-function/test/basic.preserve-true.display-p3-false.expect.css b/plugins/postcss-oklab-function/test/basic.preserve-true.display-p3-false.expect.css index 7bbc79723..3eef7075c 100644 --- a/plugins/postcss-oklab-function/test/basic.preserve-true.display-p3-false.expect.css +++ b/plugins/postcss-oklab-function/test/basic.preserve-true.display-p3-false.expect.css @@ -38,16 +38,16 @@ color-6: rgb(197, 84, 124); color-6: oklch(60% 0.150 0); - color-7: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); color-7: oklch(60% 0.1250 180); - color-8: rgb(0, 149, 131); + color-8: rgb(0, 152, 131); color-8: oklch(60% 0.1250 180deg); - color-9: rgb(0, 149, 131); + color-9: rgb(0, 152, 131); color-9: oklch(60% 0.1250 0.5turn); - color-10: rgb(0, 149, 131); + color-10: rgb(0, 152, 131); color-10: oklch(60% 0.1250 200grad); - color-11: rgb(0, 149, 131); + color-11: rgb(0, 152, 131); color-11: oklch(60% 0.1250 3.14159rad); color-12: rgb(188, 101, 59); @@ -65,16 +65,16 @@ color-18: rgb(188, 101, 59); color-18: oklch(60% 0.1250 405); - color-20: rgb(0, 149, 131); + color-20: rgb(0, 152, 131); color-20: OKLCH(60% 0.1250 180); - color-21: rgb(0, 149, 131); + color-21: rgb(0, 152, 131); color-21: Oklch(60% 0.1250 180DEG); - color-22: rgb(0, 149, 131); + color-22: rgb(0, 152, 131); color-22: oKlch(60% 0.1250 0.5TURN); - color-23: rgb(0, 149, 131); + color-23: rgb(0, 152, 131); color-23: okLch(60% 0.1250 200GRAD); - color-24: rgb(0, 149, 131); + color-24: rgb(0, 152, 131); color-24: oklCh(60% 0.1250 3.14159RAD); } @@ -216,7 +216,7 @@ .test-multiple-colors { background-1: linear-gradient(rgb(94, 83, 77), rgb(136, 126, 121)); background-1: linear-gradient(oklab(45% 0.012 0.0129), oklch(60% 0.014 45deg)); - background-2: linear-gradient(rgb(161, 0, 74), rgb(136, 126, 121)); + background-2: linear-gradient(rgb(164, 0, 74), rgb(136, 126, 121)); background-2: linear-gradient(oklab(45% 0.22 0.0129), oklch(60% 0.014 45deg)); } @@ -242,9 +242,9 @@ .test-blue-teal { /* PR 0.18049383596973165, 0.5091259470889729, 0.5339002129941043 */ - color-1: rgb(0, 131, 136); + color-1: rgb(0, 132, 138); color-1: oklab(55.28594002784124% -0.09801573105773553 -0.0346259351134503); - color-2: rgb(0, 131, 136); + color-2: rgb(0, 132, 138); color-2: oklch(55.28594002784124% 0.10395209914794032 199.45674366701544); } @@ -257,8 +257,8 @@ } .test-css-color-5-interop { - color-1: oklab(from rgb(141, 0, 0) l a b); + color-1: oklab(from rgb(143, 0, 0) l a b); color-1: oklab(from oklab(40% 0.566 0.39) l a b); - color-2: oklch(from rgb(130, 31, 0) l c h); + color-2: oklch(from rgb(136, 19, 0) l c h); color-2: oklch(from oklch(40% 0.566 39deg) l c h); } diff --git a/plugins/postcss-oklab-function/test/basic.preserve-true.expect.css b/plugins/postcss-oklab-function/test/basic.preserve-true.expect.css index aa115458d..b2ca77bc6 100644 --- a/plugins/postcss-oklab-function/test/basic.preserve-true.expect.css +++ b/plugins/postcss-oklab-function/test/basic.preserve-true.expect.css @@ -38,21 +38,21 @@ color-6: rgb(197, 84, 124); color-6: oklch(60% 0.150 0); - color-7: rgb(0, 149, 131); + color-7: rgb(0, 152, 131); color-7: color(display-p3 0.19244 0.58461 0.51559); color-7: oklch(60% 0.1250 180); - color-8: rgb(0, 149, 131); + color-8: rgb(0, 152, 131); color-8: color(display-p3 0.19244 0.58461 0.51559); color-8: oklch(60% 0.1250 180deg); - color-9: rgb(0, 149, 131); + color-9: rgb(0, 152, 131); color-9: color(display-p3 0.19244 0.58461 0.51559); color-9: oklch(60% 0.1250 0.5turn); - color-10: rgb(0, 149, 131); + color-10: rgb(0, 152, 131); color-10: color(display-p3 0.19244 0.58461 0.51559); color-10: oklch(60% 0.1250 200grad); - color-11: rgb(0, 149, 131); + color-11: rgb(0, 152, 131); color-11: color(display-p3 0.19244 0.58461 0.51559); color-11: oklch(60% 0.1250 3.14159rad); @@ -71,21 +71,21 @@ color-18: rgb(188, 101, 59); color-18: oklch(60% 0.1250 405); - color-20: rgb(0, 149, 131); + color-20: rgb(0, 152, 131); color-20: color(display-p3 0.19244 0.58461 0.51559); color-20: OKLCH(60% 0.1250 180); - color-21: rgb(0, 149, 131); + color-21: rgb(0, 152, 131); color-21: color(display-p3 0.19244 0.58461 0.51559); color-21: Oklch(60% 0.1250 180DEG); - color-22: rgb(0, 149, 131); + color-22: rgb(0, 152, 131); color-22: color(display-p3 0.19244 0.58461 0.51559); color-22: oKlch(60% 0.1250 0.5TURN); - color-23: rgb(0, 149, 131); + color-23: rgb(0, 152, 131); color-23: color(display-p3 0.19244 0.58461 0.51559); color-23: okLch(60% 0.1250 200GRAD); - color-24: rgb(0, 149, 131); + color-24: rgb(0, 152, 131); color-24: color(display-p3 0.19244 0.58461 0.51559); color-24: oklCh(60% 0.1250 3.14159RAD); } @@ -246,8 +246,8 @@ .test-multiple-colors { background-1: linear-gradient(rgb(94, 83, 77), rgb(136, 126, 121)); background-1: linear-gradient(oklab(45% 0.012 0.0129), oklch(60% 0.014 45deg)); - background-2: linear-gradient(rgb(161, 0, 74), rgb(136, 126, 121)); - background-2: linear-gradient(color(display-p3 0.59283 0 0.2865), rgb(136, 126, 121)); + background-2: linear-gradient(rgb(164, 0, 74), rgb(136, 126, 121)); + background-2: linear-gradient(color(display-p3 0.60733 0 0.28326), rgb(136, 126, 121)); background-2: linear-gradient(oklab(45% 0.22 0.0129), oklch(60% 0.014 45deg)); } @@ -273,10 +273,10 @@ .test-blue-teal { /* PR 0.18049383596973165, 0.5091259470889729, 0.5339002129941043 */ - color-1: rgb(0, 131, 136); + color-1: rgb(0, 132, 138); color-1: color(display-p3 0.18049 0.50913 0.5339); color-1: oklab(55.28594002784124% -0.09801573105773553 -0.0346259351134503); - color-2: rgb(0, 131, 136); + color-2: rgb(0, 132, 138); color-2: color(display-p3 0.18049 0.50913 0.5339); color-2: oklch(55.28594002784124% 0.10395209914794032 199.45674366701544); } @@ -290,10 +290,10 @@ } .test-css-color-5-interop { - color-1: oklab(from rgb(141, 0, 0) l a b); - color-1: oklab(from color(display-p3 0.50566 0.0781 0) l a b); + color-1: oklab(from rgb(143, 0, 0) l a b); + color-1: oklab(from color(display-p3 0.52884 0 0) l a b); color-1: oklab(from oklab(40% 0.566 0.39) l a b); - color-2: oklch(from rgb(130, 31, 0) l c h); - color-2: oklch(from color(display-p3 0.48896 0.1211 0) l c h); + color-2: oklch(from rgb(136, 19, 0) l c h); + color-2: oklch(from color(display-p3 0.50449 0.08687 0) l c h); color-2: oklch(from oklch(40% 0.566 39deg) l c h); } diff --git a/plugins/postcss-oklab-function/test/variables.expect.css b/plugins/postcss-oklab-function/test/variables.expect.css index 1d4ef3b2d..a3b9f3c87 100644 --- a/plugins/postcss-oklab-function/test/variables.expect.css +++ b/plugins/postcss-oklab-function/test/variables.expect.css @@ -1,9 +1,9 @@ :root { - --firebrick: rgb(140, 0, 58); - --firebrick-a50: rgba(137, 0, 68, 0.5); + --firebrick: rgb(141, 0, 58); + --firebrick-a50: rgba(139, 0, 68, 0.5); --opacity-50: 0.5; - --firebrick-a50-var: rgba(137, 0, 68, var(--opacity-50)); + --firebrick-a50-var: rgba(139, 0, 68, var(--opacity-50)); --point-five: 0.5; --firebrick-var: oklch(40% var(--point-five) 0.1324 / var(--opacity-50)); @@ -11,8 +11,8 @@ @supports (color: color(display-p3 0 0 0%)) { :root { - --firebrick: color(display-p3 0.51193 0 0.22329); - --firebrick-a50: color(display-p3 0.51567 0 0.25999 / 0.5); - --firebrick-a50-var: color(display-p3 0.51567 0 0.25999 / var(--opacity-50)); + --firebrick: color(display-p3 0.52468 0 0.21939); + --firebrick-a50: color(display-p3 0.51818 0 0.25972 / 0.5); + --firebrick-a50-var: color(display-p3 0.51818 0 0.25972 / var(--opacity-50)); } } diff --git a/plugins/postcss-oklab-function/test/variables.preserve-true.display-p3-false.expect.css b/plugins/postcss-oklab-function/test/variables.preserve-true.display-p3-false.expect.css index 2d9d310e6..d641f19e1 100644 --- a/plugins/postcss-oklab-function/test/variables.preserve-true.display-p3-false.expect.css +++ b/plugins/postcss-oklab-function/test/variables.preserve-true.display-p3-false.expect.css @@ -1,9 +1,9 @@ :root { - --firebrick: rgb(140, 0, 58); - --firebrick-a50: rgba(137, 0, 68, 0.5); + --firebrick: rgb(141, 0, 58); + --firebrick-a50: rgba(139, 0, 68, 0.5); --opacity-50: 0.5; - --firebrick-a50-var: rgba(137, 0, 68, var(--opacity-50)); + --firebrick-a50-var: rgba(139, 0, 68, var(--opacity-50)); --point-five: 0.5; --firebrick-var: oklch(40% var(--point-five) 0.1324 / var(--opacity-50)); diff --git a/plugins/postcss-oklab-function/test/variables.preserve-true.expect.css b/plugins/postcss-oklab-function/test/variables.preserve-true.expect.css index 0d1ea8ff0..027d7a9a1 100644 --- a/plugins/postcss-oklab-function/test/variables.preserve-true.expect.css +++ b/plugins/postcss-oklab-function/test/variables.preserve-true.expect.css @@ -1,9 +1,9 @@ :root { - --firebrick: rgb(140, 0, 58); - --firebrick-a50: rgba(137, 0, 68, 0.5); + --firebrick: rgb(141, 0, 58); + --firebrick-a50: rgba(139, 0, 68, 0.5); --opacity-50: 0.5; - --firebrick-a50-var: rgba(137, 0, 68, var(--opacity-50)); + --firebrick-a50-var: rgba(139, 0, 68, var(--opacity-50)); --point-five: 0.5; --firebrick-var: oklch(40% var(--point-five) 0.1324 / var(--opacity-50)); @@ -11,7 +11,7 @@ @supports (color: color(display-p3 0 0 0%)) { :root { - --firebrick: color(display-p3 0.51193 0 0.22329); + --firebrick: color(display-p3 0.52468 0 0.21939); } } @@ -23,7 +23,7 @@ @supports (color: color(display-p3 0 0 0%)) { :root { - --firebrick-a50: color(display-p3 0.51567 0 0.25999 / 0.5); + --firebrick-a50: color(display-p3 0.51818 0 0.25972 / 0.5); } } @@ -35,7 +35,7 @@ @supports (color: color(display-p3 0 0 0%)) { :root { - --firebrick-a50-var: color(display-p3 0.51567 0 0.25999 / var(--opacity-50)); + --firebrick-a50-var: color(display-p3 0.51818 0 0.25972 / var(--opacity-50)); } } diff --git a/plugins/postcss-relative-color-syntax/test/basic.expect.css b/plugins/postcss-relative-color-syntax/test/basic.expect.css index dfe4ef01a..95bb019c3 100644 --- a/plugins/postcss-relative-color-syntax/test/basic.expect.css +++ b/plugins/postcss-relative-color-syntax/test/basic.expect.css @@ -4,8 +4,8 @@ --color-rcs-5: rgb(179, 157, 51); --color-rcs-6: rgb(179, 35, 35); --color-rcs-7: rgb(163, 57, 39); - --color-rcs-8: rgb(141, 0, 0); - --color-rcs-9: rgb(130, 31, 0); + --color-rcs-8: rgb(143, 0, 0); + --color-rcs-9: rgb(136, 19, 0); --color-rcs-10: rgb(0, 0, 255); --color-rcs-11: rgb(0, 0, 255); --color-rcs-12: rgb(0, 0, 255); @@ -17,8 +17,8 @@ @supports (color: color(display-p3 0 0 0%)) { .valid { - --color-rcs-8: color(display-p3 0.50566 0.0781 0); - --color-rcs-9: color(display-p3 0.48896 0.1211 0); + --color-rcs-8: color(display-p3 0.52884 0 0); + --color-rcs-9: color(display-p3 0.50449 0.08687 0); } } @@ -43,8 +43,8 @@ } .spec-example-12 { - color: rgb(1, 64, 0); - color: color(display-p3 0.06186 0.25379 0); + color: rgb(0, 65, 0); + color: color(display-p3 0.02471 0.25856 0); } .spec-example-13 { @@ -109,14 +109,14 @@ } .spec-example-26 { - color: rgb(0, 159, 164); - color: color(display-p3 0 0.63049 0.66369); + color: rgb(0, 160, 166); + color: color(display-p3 0 0.63606 0.67307); color-2: rgb(85, 249, 219); } .spec-example-27 { - color: rgb(0, 178, 186); - color: color(display-p3 0 0.71015 0.76142); + color: rgb(0, 180, 188); + color: color(display-p3 0 0.71233 0.76548); } .experimental-features-from-the-color-parser { diff --git a/plugins/postcss-relative-color-syntax/test/basic.preserve-true.expect.css b/plugins/postcss-relative-color-syntax/test/basic.preserve-true.expect.css index 8cd5fbf7d..7d655d182 100644 --- a/plugins/postcss-relative-color-syntax/test/basic.preserve-true.expect.css +++ b/plugins/postcss-relative-color-syntax/test/basic.preserve-true.expect.css @@ -4,8 +4,8 @@ --color-rcs-5: rgb(179, 157, 51); --color-rcs-6: rgb(179, 35, 35); --color-rcs-7: rgb(163, 57, 39); - --color-rcs-8: rgb(141, 0, 0); - --color-rcs-9: rgb(130, 31, 0); + --color-rcs-8: rgb(143, 0, 0); + --color-rcs-9: rgb(136, 19, 0); --color-rcs-10: rgb(0, 0, 255); --color-rcs-11: rgb(0, 0, 255); --color-rcs-12: rgb(0, 0, 255); @@ -37,7 +37,7 @@ @supports (color: color(display-p3 0 0 0%)) { .valid { - --color-rcs-8: color(display-p3 0.50566 0.0781 0); + --color-rcs-8: color(display-p3 0.52884 0 0); } } @@ -49,7 +49,7 @@ @supports (color: color(display-p3 0 0 0%)) { .valid { - --color-rcs-9: color(display-p3 0.48896 0.1211 0); + --color-rcs-9: color(display-p3 0.50449 0.08687 0); } } @@ -94,8 +94,8 @@ } .spec-example-12 { - color: rgb(1, 64, 0); - color: color(display-p3 0.06186 0.25379 0); + color: rgb(0, 65, 0); + color: color(display-p3 0.02471 0.25856 0); color: lch(from green calc(l / 2) c h); } @@ -199,16 +199,16 @@ } .spec-example-26 { - color: rgb(0, 159, 164); - color: color(display-p3 0 0.63049 0.66369); + color: rgb(0, 160, 166); + color: color(display-p3 0 0.63606 0.67307); color: lch(from lch(60% 90 320) l c calc(h - 120)); color-2: rgb(85, 249, 219); color-2: hsl(from lch(60% 90 320) calc(h - 120) s l); } .spec-example-27 { - color: rgb(0, 178, 186); - color: color(display-p3 0 0.71015 0.76142); + color: rgb(0, 180, 188); + color: color(display-p3 0 0.71233 0.76548); color: oklch(from lch(60% 90 320) l c calc(h - 120)); } From 091744561e75ce3de3054f7de9ce6108d33ebea7 Mon Sep 17 00:00:00 2001 From: Romain Menke Date: Sun, 21 Apr 2024 10:58:22 +0200 Subject: [PATCH 2/2] update source integrity --- packages/color-helpers/dist/index.cjs | 2 +- packages/color-helpers/dist/index.mjs | 2 +- packages/color-helpers/scripts/hashes.json | 2 +- packages/color-helpers/src/conversions/hsl-to-srgb.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/color-helpers/dist/index.cjs b/packages/color-helpers/dist/index.cjs index 6c1479be4..2040e5f35 100644 --- a/packages/color-helpers/dist/index.cjs +++ b/packages/color-helpers/dist/index.cjs @@ -18,7 +18,7 @@ * @param {number} hue - Hue as degrees 0..360 * @param {number} sat - Saturation as percentage 0..100 * @param {number} light - Lightness as percentage 0..100 - * @return {number[]} Array of RGB components 0..1 + * @return {number[]} Array of sRGB components; in-gamut colors in range [0..1] * * @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/hslToRgb.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang). diff --git a/packages/color-helpers/dist/index.mjs b/packages/color-helpers/dist/index.mjs index 338d371d9..9a0b28142 100644 --- a/packages/color-helpers/dist/index.mjs +++ b/packages/color-helpers/dist/index.mjs @@ -18,7 +18,7 @@ function multiplyMatrices(t,_){const n=t.length;let o,e;o=Array.isArray(t[0])?t: * @param {number} hue - Hue as degrees 0..360 * @param {number} sat - Saturation as percentage 0..100 * @param {number} light - Lightness as percentage 0..100 - * @return {number[]} Array of RGB components 0..1 + * @return {number[]} Array of sRGB components; in-gamut colors in range [0..1] * * @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/hslToRgb.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang). diff --git a/packages/color-helpers/scripts/hashes.json b/packages/color-helpers/scripts/hashes.json index 938ed2d79..c00396a4c 100644 --- a/packages/color-helpers/scripts/hashes.json +++ b/packages/color-helpers/scripts/hashes.json @@ -3,7 +3,7 @@ "cd99f5e1c28fc9df18684e351049e7a6", "094c9859b0960c4e394947cc4832b54f", "c9e2f2a3b2cba543a01cb8aa5d77c04a", - "840ef26f992267c924230a26f939eaad", + "1d05413ce5d8b0669b6048f87338b106", "d575d036af8c4a813217192a15982021", "f912dea8d7d9813556f3ece0730f5392" ] \ No newline at end of file diff --git a/packages/color-helpers/src/conversions/hsl-to-srgb.ts b/packages/color-helpers/src/conversions/hsl-to-srgb.ts index 0c0d65484..229deb5e4 100644 --- a/packages/color-helpers/src/conversions/hsl-to-srgb.ts +++ b/packages/color-helpers/src/conversions/hsl-to-srgb.ts @@ -4,7 +4,7 @@ import type { Color } from '../types/color'; * @param {number} hue - Hue as degrees 0..360 * @param {number} sat - Saturation as percentage 0..100 * @param {number} light - Lightness as percentage 0..100 - * @return {number[]} Array of RGB components 0..1 + * @return {number[]} Array of sRGB components; in-gamut colors in range [0..1] * * @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/hslToRgb.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).