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

BUG : Hex color to HSL #37

Closed
ElRochito opened this issue Nov 17, 2020 · 3 comments
Closed

BUG : Hex color to HSL #37

ElRochito opened this issue Nov 17, 2020 · 3 comments

Comments

@ElRochito
Copy link
Contributor

ElRochito commented Nov 17, 2020

Hi everyone,

For example, if I convert #a8a8a8 hex color to Hsl, I do :

Hex::fromString("#a8a8a8")->toHsl()

I've got an error on Spatie\Color::class when delta is zero.

red, blue and green have same value (0.65882352941176) so $cmin and $cmax have same value

I think is the strict type on

if ($delta !== 0) {

@freekmurze
Copy link
Member

We'd accept a PR with tests that fixes this

@ElRochito
Copy link
Contributor Author

See #38 :)

@freekmurze
Copy link
Member

Thanks, we'll continue this in the 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

No branches or pull requests

2 participants