Skip to content

Commit

Permalink
change 🔧 use hsl tone to generate color filter
Browse files Browse the repository at this point in the history
  • Loading branch information
synchrovision committed Feb 21, 2022
1 parent de9f416 commit 68ed37c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/_trn.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
$tone:extract_color_tone($val);
@if $tone {
$fl:append($fl,invert(50%));
$fl:append($fl,unquote('brightness(calc('+map-get($tone,l)+' * 1.7))'));
$fl:append($fl,sepia(100%));
$fl:append($fl,unquote('saturate(calc('+map-get($tone,s)+' * 3))'));
$fl:append($fl,unquote('brightness(calc('+map-get($tone,b)+' * 1.5))'));
$fl:append($fl,saturate(1000%));
$fl:append($fl,unquote('saturate(calc('+map-get($tone,s)+' * 0.7))'));
$fl:append($fl,unquote('hue-rotate(calc('+map-get($tone,h)+' - 34deg))'));
}
}
Expand Down

0 comments on commit 68ed37c

Please sign in to comment.