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

automatically inverted color pallet/s #247

Open
JacobZwang opened this issue Oct 24, 2022 · 1 comment
Open

automatically inverted color pallet/s #247

JacobZwang opened this issue Oct 24, 2022 · 1 comment
Labels
enhancement New feature or request v1.0 The issue will be addressed in Hope UI 1.0

Comments

@JacobZwang
Copy link

Is your feature request related to a problem? Please describe.
It's annoying to have to define commonly used colors for light and dark mode when in most situations the pallet can just be inverted automatically.

This would also prevent developers from accidentally creating UI that doesn't look at least passable in both light and dark mode. Ex: they make a section of a page and make the color neutral.100 so it's a little darker than the background in light mode. In dark mode this will be a blinding and unreadable section.

Describe the solution you'd like
Provide option to use color pallets that are automatically inverted based on color mode. It won't always look perfect, but it will look good enough in the majority of use cases. The small percent where it doesn't can be manually overridden using the current system.

Describe alternatives you've considered
Adding our own pallet that does this. This feels like something that should be built in because our custom pallets could diverge from what hope is using internally. We can't override hope's pallet because hope already inverses the pallet inside it's component logic, which means it would reverse the effect.

Additional context
See Nightwind for example.

My guess is that most developers want a solution that "just works", which can then be customized if needed. That is what this provides.

@fabien-ml
Copy link
Collaborator

Hi, thanks for reporting the issue.

I've tried to find a painless way to do dark mode with tailwind-like color palettes and didn't found anything.

Thanks for the nightwind link, I will do it this way (inverting -50 and -900) for both default hope-ui colors and the ones provided by the user.

Like you said it will look good enough most of the time.

@fabien-ml fabien-ml added enhancement New feature or request v1.0 The issue will be addressed in Hope UI 1.0 WIP Work in progress and removed WIP Work in progress labels Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.0 The issue will be addressed in Hope UI 1.0
Projects
None yet
Development

No branches or pull requests

2 participants