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

feat: color prop can accept rgb colors #586

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

Roman178
Copy link
Contributor

@Roman178 Roman178 commented Apr 9, 2024

What changes are introduced?

HashLoader didn't accept rgb or rgba color (issue #582). I have added a new function that handles rgb color strings.

According to the docs in the mozilla (https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb), I tried to take into account all the cases, namely:
rgb(255 255 255 / 80%)
rgb(255 255 255)
rgb(255, 255, 255, 0.8)
rgb(255, 255, 255)

and their aliases rgba(...

I gave more priority to the opacity value contained in the rgb string. If the string does not contain this value, the opacity value is taken from the argument. I can change it if necessary.

Also I added new test cases for the function calculateRgba

I kindly ask you to review my PR. @davidhu2000

@davidhu2000
Copy link
Owner

@Roman178 thanks for this update, i'll take a look in the next week or two. Crazy busy these days. Appreciate the patience

@Roman178
Copy link
Contributor Author

Roman178 commented May 3, 2024

@davidhu2000 Thanks for the heads-up. No rush at all. I appreciate your time.

@Roman178
Copy link
Contributor Author

Hi @davidhu2000,
I hope you're doing well! I just wanted to follow up on my pull request. I understand you're very busy, but if you could find a moment to review it, I would greatly appreciate it.

Thank you for your time and consideration!

@davidhu2000 davidhu2000 changed the title HashLoader can accept rgb colors feat: color prop can accept rgb colors Jun 24, 2024
@davidhu2000 davidhu2000 enabled auto-merge (squash) June 24, 2024 05:07
@davidhu2000
Copy link
Owner

hey @Roman178 the code looks good. I'll get this published as a new version soon

@davidhu2000 davidhu2000 merged commit 612f89d into davidhu2000:main Jun 24, 2024
3 checks passed
@Roman178
Copy link
Contributor Author

@davidhu2000 thanks for approving my PR.

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