Skip to content

Use Oklch to generate palette::Extended#3028

Merged
hecrj merged 7 commits intomasterfrom
theming/oklch
Aug 6, 2025
Merged

Use Oklch to generate palette::Extended#3028
hecrj merged 7 commits intomasterfrom
theming/oklch

Conversation

@hecrj
Copy link
Member

@hecrj hecrj commented Aug 6, 2025

This PR switches our deviate logic during palette generation to use Oklch instead of HSL; improving perceived contrast consistency between themes (specially when comparing light and dark variants).

I noticed Oklch tends to produce gray colors; so I have introduced a "chromatic bump" to make them more colorful and bring out their particular personality. I suspect the math is wrong in many ways, but this is art so who cares.

image image image image

Additionally, it introduces weaker and stronger background variants. These represent a shade between weakest and weak, and strong and strongest; respectively.

Finally, this PR also enables the crisp feature by default. I've been running it in my personal projects with good results and I believe the enhanced clarity makes up for the potential drawbacks.

@hecrj hecrj added this to the 0.14 milestone Aug 6, 2025
@hecrj hecrj added improvement An internal improvement styling change labels Aug 6, 2025
@hecrj hecrj merged commit 0229723 into master Aug 6, 2025
30 checks passed
@hecrj hecrj deleted the theming/oklch branch August 6, 2025 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change improvement An internal improvement styling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant