Skip to content

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

@Widdershin

Description

@Widdershin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions