diff options
| author | Eric Biedert <github@ericbiedert.de> | 2023-12-13 13:23:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-13 13:23:32 +0100 |
| commit | 077d6b5c5442dc840327567944df64043e42e0a8 (patch) | |
| tree | 051eafa07233064da216c11be15a9c16e95c1613 /tests | |
| parent | 9cfe49e4ae63cd80a23ae0f32ac15dcc859fb640 (diff) | |
Adjust color mixing for hue-based spaces (#2931)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/compute/construct.typ | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/typ/compute/construct.typ b/tests/typ/compute/construct.typ index f6856c6f..f37669b5 100644 --- a/tests/typ/compute/construct.typ +++ b/tests/typ/compute/construct.typ @@ -32,6 +32,12 @@ #test(color.mix((rgb("#aaff00"), 50%), (rgb("#aa00ff"), 50%), space: rgb), rgb("#aa8080")) #test(color.mix((rgb("#aaff00"), 75%), (rgb("#aa00ff"), 25%), space: rgb), rgb("#aabf40")) +// Mix in hue-based space. +#test(rgb(color.mix(red, blue, space: color.hsl)), rgb("#c408ff")) +#test(rgb(color.mix((red, 50%), (blue, 100%), space: color.hsl)), rgb("#5100f8")) +// Error: 15-51 cannot mix more than two colors in a hue-based space +#rgb(color.mix(red, blue, white, space: color.hsl)) + --- // Test color conversion method kinds #test(rgb(rgb(10, 20, 30)).space(), rgb) |
