diff options
| author | frozolotl <44589151+frozolotl@users.noreply.github.com> | 2024-02-28 15:09:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-28 14:09:13 +0000 |
| commit | 9d8df00ffb587f1e6062ae471d3da3b1ac61ba9e (patch) | |
| tree | 621ff09d5c66f411d0a838de22be38d8fe57bb55 /tests | |
| parent | a518e2dd4d829b45b0887da28acb77d0568894ab (diff) | |
Implement alpha modification methods for colors (#3516)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/compiler/color.typ | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/typ/compiler/color.typ b/tests/typ/compiler/color.typ index f165ac0f..ac83355d 100644 --- a/tests/typ/compiler/color.typ +++ b/tests/typ/compiler/color.typ @@ -83,3 +83,19 @@ #test-repr(luma(20%).lighten(50%), luma(60%)) #test-repr(luma(80%).darken(20%), luma(64%)) #test-repr(luma(80%).negate(space: luma), luma(20%)) + +--- +// Test alpha modification. +// Ref: false +#test-repr(luma(100%, 100%).transparentize(50%), luma(100%, 50%)) +#test-repr(luma(100%, 100%).transparentize(75%), luma(100%, 25%)) +#test-repr(luma(100%, 50%).transparentize(50%), luma(100%, 25%)) +#test-repr(luma(100%, 10%).transparentize(250%), luma(100%, 0%)) +#test-repr(luma(100%, 40%).transparentize(-50%), luma(100%, 70%)) +#test-repr(luma(100%, 0%).transparentize(-100%), luma(100%, 100%)) + +#test-repr(luma(100%, 50%).opacify(50%), luma(100%, 75%)) +#test-repr(luma(100%, 20%).opacify(100%), luma(100%, 100%)) +#test-repr(luma(100%, 100%).opacify(250%), luma(100%, 100%)) +#test-repr(luma(100%, 50%).opacify(-50%), luma(100%, 25%)) +#test-repr(luma(100%, 0%).opacify(0%), luma(100%, 0%)) |
