diff options
| author | Sébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com> | 2024-01-08 16:53:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-08 15:53:22 +0000 |
| commit | 712eaaa5f404aff51163919d43361d9c2bb19873 (patch) | |
| tree | f81f1d8e7c53fd4dccc2826055166a6a954c442b /tests/typ | |
| parent | 67a0afe9bd7bb176c629f5040af63f68ddf48752 (diff) | |
Fix CMYK on gradients (#3142)
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/bugs/gradient-cmyk-encode.typ | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/typ/bugs/gradient-cmyk-encode.typ b/tests/typ/bugs/gradient-cmyk-encode.typ new file mode 100644 index 00000000..5e0b58dc --- /dev/null +++ b/tests/typ/bugs/gradient-cmyk-encode.typ @@ -0,0 +1,27 @@ +// Test that CMYK works on gradients + +--- +#set page(margin: 0pt, width: 200pt, height: auto) + +#let violet = cmyk(75%, 80%, 0%, 0%) +#let blue = cmyk(75%, 30%, 0%, 0%) + +#rect( + width: 100%, + height: 30pt, + fill: gradient.linear(violet, blue) +) + +#rect( + width: 100%, + height: 30pt, + fill: gradient.linear(rgb(violet), rgb(blue)) +) + +// In PDF format, this gradient can look different from the others. +// This is because PDF readers do weird things with CMYK. +#rect( + width: 100%, + height: 30pt, + fill: gradient.linear(violet, blue, space: cmyk) +) |
