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

[DRAFT] Feature: Luminance Scale #44

Closed
wants to merge 14 commits into from

Conversation

kevnk
Copy link

@kevnk kevnk commented Apr 11, 2021

Hey guys, this may be a long shot/edge case feature, but I thought I'd see what you thought.

Knowing how useful working from a luminance-based scale is something everyone may not be aware of. That's why I created https://grayscale.design. This is what has inspired this feature.

Currently, I use this feature on a site where the user can select a primary and secondary color to style their "white labeled" version of the site. So they set two colors, and I can use this toLuminanceScale() method to come up with a TailwindCSS-esque color scale server-side. These values will be used for custom tailwind classes.

I wanted to gauge your interest before updating the README and writing tests (which, by the way, I could use some guidance on as well if you don't mind...).

Let me know what you think!

@kevnk
Copy link
Author

kevnk commented Apr 12, 2021

6a24b0d adds a contrastRatio method which can be used to determine if someone should use white or black text on a background of this Color.

Inspiration and help from this stack overflow

@kevnk kevnk mentioned this pull request Apr 15, 2021
@spatie-bot
Copy link

Dear contributor,

because this pull request seems to be inactive for quite some time now, I've automatically closed it. If you feel this pull request deserves some attention from my human colleagues feel free to reopen it.

@spatie-bot spatie-bot closed this Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants