From 404a407e5c60494509d3aa1bdb57155184bc4367 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 9 Dec 2024 16:56:25 +0100 Subject: Support hue rotation --- src/_functions.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/_functions.scss b/src/_functions.scss index 62caf8c..b41609e 100644 --- a/src/_functions.scss +++ b/src/_functions.scss @@ -23,10 +23,14 @@ $color: list.nth($level, 1); $y: 0; $c: 1; + $h: 0deg; @if list.length($level) > 1 { $c: list.nth($level, 2); } + @if list.length($level) > 2 { + $h: list.nth($level, 3); + } @if meta.type-of($color) != 'color' { $y: apca.reverse($color, $ref-y); @@ -38,7 +42,7 @@ $y: $ref-y; } - $color: oklch($l ($c * color.channel($base-lch, 'chroma')) color.channel($base-lch, 'hue')); + $color: oklch($l ($c * color.channel($base-lch, 'chroma')) ($h + color.channel($base-lch, 'hue'))); } @else { $y: apca.sRGB_to_Y($color); } -- cgit v1.2.3-70-g09d2