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

Color.toHsl (Color.rgb 255 255 255) returns to NaN #895

Closed
simonh1000 opened this Issue Aug 10, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@simonh1000
Contributor

simonh1000 commented Aug 10, 2017

In elm-repl

> import Color
> Color.toHsl (Color.rgb 255 255 255)
{ hue = NaN, saturation = NaN, lightness = 1, alpha = 1 }
    : { alpha : Float, hue : Float, lightness : Float, saturation : Float
      }

Likewise Color.toHsl Color.white fails

@process-bot

This comment has been minimized.

Show comment
Hide comment
@process-bot

process-bot Aug 10, 2017

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

process-bot commented Aug 10, 2017

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@zwilias

This comment has been minimized.

Show comment
Hide comment
@zwilias

zwilias Aug 10, 2017

Member

Related PR's and discussion: #695 and #587 and an important commit

Depending on use-case, you may be able to work around the issue with if isNaN v then 0 else v to post-process .hue and .saturation.

Member

zwilias commented Aug 10, 2017

Related PR's and discussion: #695 and #587 and an important commit

Depending on use-case, you may be able to work around the issue with if isNaN v then 0 else v to post-process .hue and .saturation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment