diff options
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/layout/stack-1.typ | 4 | ||||
| -rw-r--r-- | tests/typ/utility/color.typ | 19 |
2 files changed, 12 insertions, 11 deletions
diff --git a/tests/typ/layout/stack-1.typ b/tests/typ/layout/stack-1.typ index a4a0d6b8..d8075e9d 100644 --- a/tests/typ/layout/stack-1.typ +++ b/tests/typ/layout/stack-1.typ @@ -8,8 +8,8 @@ ) #let shaded = { - let v = 0 - let next() = { v += 0.1; rgb(v, v, v) } + let v = 0% + let next() = { v += 10%; rgb(v, v, v) } w => rect(width: w, height: 10pt, fill: next()) } diff --git a/tests/typ/utility/color.typ b/tests/typ/utility/color.typ index 759672ff..fa30a4f2 100644 --- a/tests/typ/utility/color.typ +++ b/tests/typ/utility/color.typ @@ -3,20 +3,21 @@ --- // Compare both ways. -#test(rgb(0.0, 0.3, 0.7), rgb("004db3")) +#test(rgb(0%, 30%, 70%), rgb("004db3")) // Alpha channel. -#test(rgb(1.0, 0.0, 0.0, 0.5), rgb("ff000080")) +#test(rgb(255, 0, 0, 50%), rgb("ff000080")) --- -// Error for values that are out of range. -// Error: 11-14 value must be between 0.0 and 1.0 -#test(rgb(-30, 15.5, 0.5)) +// Test CMYK color conversion. +// Ref: true +#rect(fill: cmyk(69%, 11%, 69%, 41%)) +#rect(fill: cmyk(50%, 64%, 16%, 17%)) --- // Error for values that are out of range. -// Error: 26-30 value must be between 0.0 and 1.0 -#test(rgb(0.1, 0.2, 0.3, -0.1)) +// Error: 11-14 must be between 0 and 255 +#test(rgb(-30, 15, 50)) --- // Error: 6-11 invalid hex string @@ -31,5 +32,5 @@ #rgb(0, 1) --- -// Error: 21-26 expected float, found boolean -#rgb(0.1, 0.2, 0.3, false) +// Error: 21-26 expected integer or relative, found boolean +#rgb(10%, 20%, 30%, false) |
