Skip to content

Commit

Permalink
add new eso fiter to demo
Browse files Browse the repository at this point in the history
  • Loading branch information
meodai committed May 3, 2024
1 parent f323b68 commit 6ccf691
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,31 @@ <h2>Color Properties</h2>
harveyHue: ([h,s,l]) => [harveyHue(h/360) * 360, s, l],
muted: ([h,s,l]) => [h, s * .5, l],
pastel: ([h,s,l]) => [h, s, .2 + l * .8],
pseudoPrint: ([h,s,l]) => {
// if light is above .9 make the hue yellowish
if (l > .9) {
h = 36;
}
// clamp white to 95
l = Math.min(l, .92);
// make sure black is never too dark
l = Math.max(l, .11);

// make sure none of the colors are too saturated
s = Math.min(s, .7);
// when greenish lower saturation more
if (h > 80 && h < 160) {
s = Math.min(s, .5);
}

// if light teal make darker
if (h > 172 && h < 195) {
l *= .8;
s += .15;
}

return [h, s, l];
},
};

const easingFunctionsKeys = Object.keys(easingFunctions);
Expand Down

0 comments on commit 6ccf691

Please sign in to comment.