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

Color.Gradient.linearGradient with size 1 results in NaN #22

Open
Widdershin opened this issue Mar 16, 2018 · 1 comment
Open

Color.Gradient.linearGradient with size 1 results in NaN #22

Widdershin opened this issue Mar 16, 2018 · 1 comment

Comments

@Widdershin
Copy link

Hello,

I've encountered an issue with the linearGradient function.

> import Color exposing (Color)
> import Color.Interpolate exposing (..)
> import Color.Gradient exposing (linearGradient)
> palette = [ Color.white, Color.white ]
> linearGradient RGB palette 1
[RGBA NaN NaN NaN NaN] : Color.Gradient.Palette

In this case, I feel like we should get a palette back that simply consists of white, rather than NaN.

Perhaps this is related to https://github.com/elm-lang/core/issues/895 but I have not done enough digging to find the root cause.

@eskimoblood
Copy link
Owner

Yes its related. I don't think this should be fix here.

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