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

Set the color by an HSL string #50

Closed
obscuredetour opened this issue Jan 28, 2019 · 4 comments
Closed

Set the color by an HSL string #50

obscuredetour opened this issue Jan 28, 2019 · 4 comments
Assignees
Labels

Comments

@obscuredetour
Copy link

Hey @jaames,

First of all let me say that iro.js is excellent! As you know I am using it in my pwa Color Deck.

I found a bug when setting the color using an HSL string. It causes iro.js to crash, with only a reload fixing it. This can be recreated in the iro.js demo (as shown below). Open the Console and type colorPicker.color.hslString = 'hsl(182, 35%, 65%)'.

iro js_hslstring

I did notice that this extends to parsing an HSL string with the iro.Color.parseHslStr method as well. It returns 'parsed is null'. Perhaps, the two are related?

@jaames jaames self-assigned this Jan 28, 2019
@jaames jaames added the bug label Jan 28, 2019
@jaames
Copy link
Owner

jaames commented Jan 28, 2019

Hi @obscuredetour, thank you for the bug report!

I can confirm this is an issue on my end too. My guess is that the parseHslStr method isn't parsing the regex matches from the hsl string correctly (and hslString isn't working too since it uses this method internally). I'll take a look at it now.

Also thanks for the kind words! I'm happy to hear you chose iro.js for your app. Sorry about the awkward bug. :P

@jaames
Copy link
Owner

jaames commented Jan 28, 2019

Ahah, seems like parseHslStr wasn't taking the right array values from the hsl string regex match. Just pushed a hotfix now -- hopefully that should solve it.

I think I'm also going to start implementing code tests to make sure something like that doesn't end up in the library again. Sorry for the trouble!


By the way, I'm currently working on the next major release of iro.js. You're welcome to join the v4 discussion thread if you have any feature suggestions or other feedback after using the library in your project. :)

@jaames jaames closed this as completed Jan 28, 2019
@obscuredetour
Copy link
Author

Thanks so much for the fix @jaames! That was fast 👍

I started testing v4 #30 in my project on a separate branch, but couldn't get many methods to work. So I'll wait for more of your awesome documentation. 😄 I am liking many of the features listed! I will add any I deem worthy. Thanks again!

@jaames
Copy link
Owner

jaames commented Feb 22, 2019

Hey @obscuredetour! I finally got around to making the final changes on v4 and pushed it into production, the new documentation is live on https://iro.js.org now too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants