Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Interpolator throwing a NaN/undefined #202

Open
Assignees
danburzo
Labels
BugSomething isn't working
@marcelpi

Description

@marcelpi

Hey there,

First off, thank you for a wonderful library.
I encountered a bug when trying to interpolate two colors in Lch and okLch space. Everything works fine, except when an interpolated color is black or white and there are more than two colors to interpolate over.

In the example below, I've got 3 colors in the initial color array and something breaks. However, if I delete one of them and start just with two everything works fine.

If I inspect one of the missing colors I notice the CSS property: background: lch(73.90988017397126 107.41130153548478NaN)
The NaN is probably generating the problem.

Code here:https://codesandbox.io/s/lch-interpolator-wt5yk5?file=/App.svelte

Also, if I put just black and white as starting colors I get background: lch(100.00000139649632 0undefined) for white and lch(0 0undefined) for black.

Does this happen because black and white being achromatic colors are missing theh attribute?

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp