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

Support CSS colors #237

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Support CSS colors #237

wants to merge 3 commits into from

Conversation

fulldecent
Copy link

This adds support for CSS colors like red in addition to the existing supported #FF0000.

@fulldecent
Copy link
Author

Oh and PS now GitHub renders CSS colors in comments, lol

Copy link

@lionel-rowe lionel-rowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This supports more than just named CSS colors, it'll also work for e.g. HSL colors hsl(10deg 50% 50%), short-form hex colors #f00, etc.

src/confetti.js Outdated Show resolved Hide resolved
src/confetti.js Outdated Show resolved Hide resolved
@frederikheld
Copy link

frederikheld commented Dec 4, 2024

That would be a great new feature. I just had to write my own rgb to hex converter to be able to use the css color variables of my project's theme.

fulldecent and others added 2 commits December 8, 2024 00:40
Co-authored-by: lionel-rowe <[email protected]>
Co-authored-by: lionel-rowe <[email protected]>
@fulldecent
Copy link
Author

@lionel-rowe thank you, good implementation!

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.

3 participants