Skip to content

Commit

Permalink
Update color tests for new improved LMS matrices
Browse files Browse the repository at this point in the history
See #2024
  • Loading branch information
nex3 committed Oct 2, 2024
1 parent 83bd499 commit 34b2d77
Show file tree
Hide file tree
Showing 85 changed files with 574 additions and 574 deletions.
2 changes: 1 addition & 1 deletion spec/core_functions/color/adjust/global.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ a {b: change-color(pink, $chroma: 0.01, $space: oklch)}

<===> non_legacy/output.css
a {
b: rgb(217.7587670223, 208.8497864408, 210.1600909257);
b: rgb(217.7587741846, 208.8497862891, 210.1600712342);
}
4 changes: 2 additions & 2 deletions spec/core_functions/color/adjust/space.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ a {b: color.adjust(pink, $chroma: -0.01, $space: oklch)}

<===> legacy/to_modern/output.css
a {
b: rgb(249.5073873455, 194.8272088475, 204.1290090118);
b: rgb(249.5073881917, 194.8272088582, 204.1290059224);
}

<===>
Expand All @@ -48,7 +48,7 @@ a {b: color.adjust(lab(50% 10 -20), $chroma: 0.01, $space: oklch)}

<===> modern/to_modern/output.css
a {
b: lab(49.8635566117% 11.8934236813 -23.2342925555);
b: lab(49.8635566292% 11.8934232635 -23.234292765);
}

<===>
Expand Down
2 changes: 1 addition & 1 deletion spec/core_functions/color/change/global.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ a {b: change-color(pink, $chroma: 0.06, $space: oklch)}

<===> non_legacy/output.css
a {
b: rgb(247.5333900768, 195.811523731, 204.5286989775);
b: rgb(247.5333922506, 195.8115232441, 204.5286945902);
}
2 changes: 1 addition & 1 deletion spec/core_functions/color/change/oklab.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ a {b: color.change(oklab(50% 0.2 -0.3), $lightness: 1.2)}

<===> lightness/out_of_range/output.css
a {
b: color-mix(in oklab, color(xyz 2.3267923962 1.5626810194 5.2743259015) 100%, black);
b: color-mix(in oklab, color(xyz 2.3267922825 1.5626810145 5.2743251916) 100%, black);
}

<===>
Expand Down
2 changes: 1 addition & 1 deletion spec/core_functions/color/change/oklch.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ a {b: color.change(oklch(50% 0.2 30deg), $lightness: 120%)}

<===> lightness/out_of_range/output.css
a {
b: color-mix(in oklch, color(xyz 2.0602078346 1.6344742217 1.0169251403) 100%, black);
b: color-mix(in oklch, color(xyz 2.0602077969 1.6344741917 1.0169248199) 100%, black);
}

<===>
Expand Down
4 changes: 2 additions & 2 deletions spec/core_functions/color/change/space.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ a {b: color.change(pink, $chroma: 0.01, $space: oklch)}

<===> legacy/to_modern/output.css
a {
b: rgb(217.7587670223, 208.8497864408, 210.1600909257);
b: rgb(217.7587741846, 208.8497862891, 210.1600712342);
}

<===>
Expand All @@ -48,7 +48,7 @@ a {b: color.change(lab(50% 10 -20), $chroma: 0.01, $space: oklch)}

<===> modern/to_modern/output.css
a {
b: lab(50.5994457353% 1.499908117 -3.4111247636);
b: lab(50.5994458541% 1.4999074176 -3.4111169436);
}

<===>
Expand Down
6 changes: 3 additions & 3 deletions spec/core_functions/color/channel/oklab.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ a {b: color.channel(pink, "lightness", $space: oklab)}

<===> foreign/lightness/output.css
a {
b: 86.7738445294%;
b: 86.7738450841%;
}

<===>
Expand All @@ -48,7 +48,7 @@ a {b: color.channel(pink, "a", $space: oklab)}

<===> foreign/a/output.css
a {
b: 0.0729803698;
b: 0.072980372;
}

<===>
Expand All @@ -59,5 +59,5 @@ a {b: color.channel(pink, "b", $space: oklab)}

<===> foreign/b/output.css
a {
b: 0.0090714488;
b: 0.0090714168;
}
6 changes: 3 additions & 3 deletions spec/core_functions/color/channel/oklch.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ a {b: color.channel(pink, "lightness", $space: oklch)}

<===> foreign/lightness/output.css
a {
b: 86.7738445294%;
b: 86.7738450841%;
}

<===>
Expand All @@ -48,7 +48,7 @@ a {b: color.channel(pink, "chroma", $space: oklch)}

<===> foreign/chroma/output.css
a {
b: 0.0735419986;
b: 0.0735419968;
}

<===>
Expand All @@ -59,5 +59,5 @@ a {b: color.channel(pink, "hue", $space: oklch)}

<===> foreign/hue/output.css
a {
b: 7.0855142734deg;
b: 7.0854893498deg;
}
2 changes: 1 addition & 1 deletion spec/core_functions/color/channel/positional.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ a {b: color.channel(oklch(60% 70% 0.6turn), "red", rgb)}

<===> output.css
a {
b: -143.1028884453;
b: -143.1028856642;
}
8 changes: 4 additions & 4 deletions spec/core_functions/color/complement.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ a {b: color.complement(red, $space: oklch)}

<===> space/legacy/to_modern/output.css
a {
b: hsl(188.1998868883, 488.1808399597%, 14.588696385%);
b: hsl(188.199882451, 488.180958059%, 14.5886916745%);
}

<===>
Expand All @@ -113,7 +113,7 @@ a {b: color.complement(lab(50% 10 -20), $space: oklch)}

<===> space/modern/to_modern/output.css
a {
b: lab(51.2269614349% -7.7080887555 21.8652618775);
b: lab(51.226961501% -7.7080869407 21.8652805706);
}

<===>
Expand Down Expand Up @@ -179,7 +179,7 @@ a {b: color.complement(color(srgb none 100 200), $space: oklch)}

<===> space/missing/modern/different/output.css
a {
b: color(srgb 156.4212689375 85.1578644836 -71.2263945029);
b: color(srgb 156.4212742119 85.1578604941 -71.226404054);
}

<===>
Expand All @@ -190,7 +190,7 @@ a {b: color.complement(lch(none 50% 0deg), $space: oklch)}

<===> space/missing/modern/analogous/output.css
a {
b: lch(none 24.5072211405 180.9107983689deg);
b: lch(none 24.5072331187 180.9107983391deg);
}

<===>
Expand Down
6 changes: 3 additions & 3 deletions spec/core_functions/color/grayscale.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ a {b: color.grayscale(lab(50 -30 40))}

<===> modern/rectangular/output.css
a {
b: lab(48.58892555% 0.0000000648 -0.0000078984);
b: lab(48.5889256803% 0 0);
}

<===>
Expand All @@ -188,7 +188,7 @@ a {b: color.grayscale(lch(54.3 107 40.9))}

<===> modern/polar/output.css
a {
b: lch(56.854581217% 0.0000089094 270.4699001175deg);
b: lch(56.8545812484% 0 none);
}

<===>
Expand All @@ -199,7 +199,7 @@ a {b: color.grayscale(color(xyz-d65 0.41 0.21 0.02))}

<===> modern/predefined/output.css
a {
b: color(xyz 0.232829773 0.2449664044 0.2667826176);
b: color(xyz 0.2328297704 0.2449664038 0.2667825607);
}

<===>
Expand Down
2 changes: 1 addition & 1 deletion spec/core_functions/color/invert/named.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ a {b: color.invert($color: turquoise, $weight: 10%, $space: oklch)}

<===> output.css
a {
b: rgb(72.3071640492, 202.5503954693, 158.9647820206);
b: rgb(72.3071483527, 202.5503969316, 158.9647817173);
}
4 changes: 2 additions & 2 deletions spec/core_functions/color/mix/explicit_method.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ a {b: mix(lab(54.3 80.8 69.9), lch(46.3 68 134), $method: oklch)}

<===> non_srgb/output.css
a {
b: lab(50.3820989016% 23.739480318 159.7498257827);
b: lab(50.3820988862% 23.7394813109 159.7498356926);
}

<===>
Expand All @@ -35,5 +35,5 @@ a {b: mix(lab(54.3 80.8 69.9), lch(46.3 68 134), 30%, oklch)}

<===> weighted/output.css
a {
b: lab(48.946809662% -7.9262399011 131.5295913021);
b: lab(48.9468096831% -7.9262402391 131.5295999957);
}
2 changes: 1 addition & 1 deletion spec/core_functions/color/mix/predefined.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ a {b: mix(color(display-p3 1 0 0), color(display-p3 0 1 0), 20%, oklch)}

<===> rgb/output.css
a {
b: color(display-p3 0.6684751745 0.8535262883 -0.4281891831);
b: color(display-p3 0.6684751748 0.8535262895 -0.4281892011);
}

<===>
Expand Down
2 changes: 1 addition & 1 deletion spec/core_functions/color/same.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ a {
a {
b: color.same(
color(rec2020 0.5 none 0.2),
oklab(44.668866707461% 0.236673642675 0.018728349677)
oklab(44.66886691637825% 0.2366736512579 0.01872833430856)
);
}

Expand Down
2 changes: 1 addition & 1 deletion spec/core_functions/color/scale/global.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ a {b: scale-color(pink, $chroma: -10%, $space: oklch)}

<===> non_legacy/output.css
a {
b: rgb(250.9720040643, 194.0861924561, 203.8303793932);
b: rgb(250.9720047847, 194.0861924112, 203.8303770998);
}
2 changes: 1 addition & 1 deletion spec/core_functions/color/scale/space.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ a {b: color.scale(lab(50% 10 -20), $chroma: 20%, $space: oklch)}

<===> modern/to_modern/output.css
a {
b: lab(48.9487508713% 24.2085150873 -41.732226413);
b: lab(48.9487510552% 24.2085116419 -41.7322265307);
}

<===>
Expand Down
2 changes: 1 addition & 1 deletion spec/core_functions/color/to_gamut/a98_rgb.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ a {b: color.to-gamut(color(a98-rgb 1.1 0.5 0.8), $method: local-minde)}

<===> local_minde/out_of_gamut/output.css
a {
b: color(a98-rgb 1 0.5850609654 0.8001989835);
b: color(a98-rgb 1 0.5850609644 0.8001989651);
}

<===>
Expand Down
2 changes: 1 addition & 1 deletion spec/core_functions/color/to_gamut/display_p3.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ a {b: color.to-gamut(color(display-p3 1.5 0.5 0.8), $method: local-minde)}

<===> local_minde/out_of_gamut/output.css
a {
b: color(display-p3 1 0.9080382844 0.9302909848);
b: color(display-p3 1 0.9080382834 0.9302909049);
}

<===>
Expand Down
2 changes: 1 addition & 1 deletion spec/core_functions/color/to_gamut/hsl.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ a {

<===> local_minde/out_of_gamut/output.css
a {
b: hsl(73.5850781672, 100%, 67.4750294398%);
b: hsl(73.5850769516, 100%, 67.4750278515%);
}

<===>
Expand Down
2 changes: 1 addition & 1 deletion spec/core_functions/color/to_gamut/hwb.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ a {b: color.to-gamut(hwb(70deg -5% -5%), $method: local-minde)}

<===> local_minde/out_of_gamut/output.css
a {
b: hsl(75.7157487534, 100%, 75.8982992248%);
b: hsl(75.715745279, 100%, 75.8982967878%);
}

<===>
Expand Down
4 changes: 2 additions & 2 deletions spec/core_functions/color/to_gamut/oklab.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ a {

<===> clip/output.css
a {
b: color-mix(in oklab, color(xyz 593644537356868864 -153762261215017152 3418717280664545280) 100%, black);
b: color-mix(in oklab, color(xyz 593644542057412352 -153762246556648064 3418717351297831424) 100%, black);
}

<===>
Expand All @@ -25,5 +25,5 @@ a {

<===> local_minde/output.css
a {
b: color-mix(in oklab, color(xyz 593644537356868864 -153762261215017152 3418717280664545280) 100%, black);
b: color-mix(in oklab, color(xyz 593644542057412352 -153762246556648064 3418717351297831424) 100%, black);
}
4 changes: 2 additions & 2 deletions spec/core_functions/color/to_gamut/oklch.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ a {

<===> clip/output.css
a {
b: color-mix(in oklch, color(xyz 5.2395754107 2.9713210909 -1.434870419) 100%, black);
b: color-mix(in oklch, color(xyz 5.2395754279 2.9713210325 -1.434870444) 100%, black);
}

<===>
Expand All @@ -25,5 +25,5 @@ a {

<===> local_minde/output.css
a {
b: color-mix(in oklch, color(xyz 5.2395754107 2.9713210909 -1.434870419) 100%, black);
b: color-mix(in oklch, color(xyz 5.2395754279 2.9713210325 -1.434870444) 100%, black);
}
2 changes: 1 addition & 1 deletion spec/core_functions/color/to_gamut/prophoto_rgb.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ a {b: color.to-gamut(color(prophoto-rgb 1.1 0.5 0.8), $method: local-minde)}

<===> local_minde/out_of_gamut/output.css
a {
b: color(prophoto-rgb 1 0.5625312196 0.7939519528);
b: color(prophoto-rgb 1 0.5625312191 0.7939519353);
}

<===>
Expand Down
2 changes: 1 addition & 1 deletion spec/core_functions/color/to_gamut/rec2020.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ a {b: color.to-gamut(color(rec2020 1.1 0.5 0.8), $method: local-minde)}

<===> local_minde/out_of_gamut/output.css
a {
b: color(rec2020 1 0.5720949845 0.7959438083);
b: color(rec2020 1 0.572094984 0.7959437908);
}

<===>
Expand Down
2 changes: 1 addition & 1 deletion spec/core_functions/color/to_gamut/rgb.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ a {b: color.to-gamut(color.change(#abcdef, $red: 300), $method: local-minde)}

<===> local_minde/out_of_gamut/output.css
a {
b: rgb(255, 222.6637652053, 237.9231180222);
b: rgb(255, 222.6637650714, 237.9231048356);
}

<===>
Expand Down
10 changes: 5 additions & 5 deletions spec/core_functions/color/to_gamut/space.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ a {b: color.to-gamut(oklch(60% 0.15 240deg), $space: rgb, $method: clip)}

<===> clip/out_of_gamut/output.css
a {
b: oklch(60.4068473688% 0.1443906201 242.3895382399deg);
b: oklch(60.4068471201% 0.1443906236 242.3895367243deg);
}

<===>
Expand Down Expand Up @@ -191,7 +191,7 @@ a {b: color.to-gamut(oklch(60% 0.15 240deg), $space: rgb, $method: local-minde)}

<===> local_minde/out_of_gamut/output.css
a {
b: oklch(60.4068473688% 0.1443906201 242.3895382399deg);
b: oklch(60.4068471201% 0.1443906236 242.3895367243deg);
}

<===>
Expand All @@ -202,7 +202,7 @@ a {b: color.to-gamut(oklch(100% 0.13 240deg), $space: rgb, $method: local-minde)

<===> local_minde/to_white/output.css
a {
b: oklch(99.9999993474% 0.0000000373 89.8755630959deg);
b: oklch(100% 0 none);
}

<===>
Expand Down Expand Up @@ -251,7 +251,7 @@ a {

<===> local_minde/missing/legacy/same/with_mapping/output.css
a {
b: rgb(220.0210985908, 255, 215.6454599021);
b: rgb(220.0211077797, 255, 215.6454381401);
}

<===>
Expand Down Expand Up @@ -318,7 +318,7 @@ a {b: color.to-gamut(color(srgb none 1.2 none), $method: local-minde)}

<===> local_minde/missing/modern/same/with_mapping/output.css
a {
b: color(srgb 0.9249489323 1 0.9135716721);
b: color(srgb 0.9249489701 1 0.9135715783);
}

<===>
Expand Down
2 changes: 1 addition & 1 deletion spec/core_functions/color/to_gamut/srgb.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ a {b: color.to-gamut(color(srgb 1.5 0.5 0.8), $method: local-minde)}

<===> local_minde/out_of_gamut/output.css
a {
b: color(srgb 1 0.8660162103 0.8987034234);
b: color(srgb 1 0.8660162083 0.8987033424);
}

<===>
Expand Down
Loading

0 comments on commit 34b2d77

Please sign in to comment.