summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/visualize/gradient-hue-rotation.typ66
1 files changed, 66 insertions, 0 deletions
diff --git a/tests/typ/visualize/gradient-hue-rotation.typ b/tests/typ/visualize/gradient-hue-rotation.typ
new file mode 100644
index 00000000..2cc6f9a6
--- /dev/null
+++ b/tests/typ/visualize/gradient-hue-rotation.typ
@@ -0,0 +1,66 @@
+// Tests whether hue rotation works correctly.
+
+---
+// Test in Oklab space for reference.
+#set page(
+ width: 100pt,
+ height: 30pt,
+ fill: gradient.linear(red, purple, space: oklab)
+)
+
+---
+// Test in OkLCH space.
+#set page(
+ width: 100pt,
+ height: 30pt,
+ fill: gradient.linear(red, purple, space: oklch)
+)
+
+---
+// Test in HSV space.
+#set page(
+ width: 100pt,
+ height: 30pt,
+ fill: gradient.linear(red, purple, space: color.hsv)
+)
+
+---
+// Test in HSL space.
+#set page(
+ width: 100pt,
+ height: 30pt,
+ fill: gradient.linear(red, purple, space: color.hsl)
+)
+
+
+---
+// Test in Oklab space for reference.
+#set page(
+ width: 100pt,
+ height: 100pt,
+ fill: gradient.conic(red, purple, space: oklab)
+)
+
+---
+// Test in OkLCH space.
+#set page(
+ width: 100pt,
+ height: 100pt,
+ fill: gradient.conic(red, purple, space: oklch)
+)
+
+---
+// Test in HSV space.
+#set page(
+ width: 100pt,
+ height: 100pt,
+ fill: gradient.conic(red, purple, space: color.hsv)
+)
+
+---
+// Test in HSL space.
+#set page(
+ width: 100pt,
+ height: 100pt,
+ fill: gradient.conic(red, purple, space: color.hsl)
+)