Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Themes] Allow modern colour formats like oklch. #2671

Open
BleedingDev opened this issue Jan 13, 2025 · 2 comments
Open

[Themes] Allow modern colour formats like oklch. #2671

BleedingDev opened this issue Jan 13, 2025 · 2 comments
Labels
feature request Request new feature

Comments

@BleedingDev
Copy link

Which Component Need Enhancement 期望新增功能的组件

  • Themes

What does the proposed API look like 期望支持的API

Same as for RGB, only allows different values.

Feature Description 功能描述

Allow definition of themes in modern CSS formats like oklch.

Additional information 补充说明

Tailwind recently added new colours:
https://tailwindcss.com/docs/v4-beta#modernized-p3-color-palette
oklch is widely supported:
https://caniuse.com/?search=oklch

@BleedingDev BleedingDev added the feature request Request new feature label Jan 13, 2025
@DaiQiangReal
Copy link
Collaborator

DaiQiangReal commented Jan 17, 2025

What is the usage scenario? By the way, You can use some postcss plugin in your project to auto convert.

@BleedingDev
Copy link
Author

Usage scenario is support of better monitors with more colours. It also can provide smoother transitions because of more colours in total.

OKLCH supports a wide gamut of colors, such as sRGB, Display P3, and even the most recent Rec2020. The Display P3 gamut has 50% more colors than the sRGB gamut.

I think this article explains it well:
https://www.smashingmagazine.com/2023/08/oklch-color-spaces-gamuts-css/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request new feature
Projects
None yet
Development

No branches or pull requests

2 participants