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

Fix: HSL -> RGB Accuracy. #940

Closed
wants to merge 1 commit into from
Closed

Fix: HSL -> RGB Accuracy. #940

wants to merge 1 commit into from

Conversation

ShanonJackson
Copy link

@aleclarson aleclarson added this to the v9.0.0 milestone Apr 17, 2020
@aleclarson aleclarson changed the base branch from master to v9-rc.1 May 3, 2020 20:58
@aleclarson aleclarson changed the base branch from v9-rc.1 to master May 3, 2020 20:59
@aleclarson
Copy link
Contributor

Merged into #978

@aleclarson aleclarson closed this May 3, 2020
@aleclarson
Copy link
Contributor

Now available in v9.0.0-rc.2 #985

@aleclarson
Copy link
Contributor

This PR will be reverted in v9.0.0-rc.4 because it returns rgb(255, 97, 97) for hsl(57, 100%, 69%) when it should actually be rgb(255, 247, 97). The previous implementation works as expected, at least in this case.

@ShanonJackson
Copy link
Author

ShanonJackson commented May 24, 2020

Might be worth just using the native DOM technique to convert colors, it (should) always be right. However this wont work for SSR.

var div = document.createElement("div");
div.style.color = "hsl(57, 100%, 69%)"
console.log(div.style.color) // rgb(255, 247, 97);

where it always converts to RGB.

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.

None yet

2 participants