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

support hex color #3

Closed
kzfile opened this issue Nov 27, 2023 · 2 comments
Closed

support hex color #3

kzfile opened this issue Nov 27, 2023 · 2 comments

Comments

@kzfile
Copy link

kzfile commented Nov 27, 2023

Hi, I get NaN if I set color table in hex string like:

const { parsePalette } = require('cpt2js');

const palette = `
0   #5d96a5
1   #91d54d
`;

const paletteScale = parsePalette(palette);

paletteScale(1).rbg(); // [ NaN, NaN, NaN ]

I notice the color test here ignore hex string color, does it meet the expectations?

Thank You.

@kzfile
Copy link
Author

kzfile commented Dec 1, 2023

@zakjan is this a feature or a bug?

@zakjan
Copy link
Collaborator

zakjan commented Dec 2, 2023

Hi, yes this was a bug indeed. Thanks for reporting.

Fixed in 2da0c24, released as 1.5.2.

@zakjan zakjan closed this as completed Dec 2, 2023
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