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

Switch to avh4/elm-color type. #4

Closed

Conversation

RalfNorthman
Copy link

As talked about in #1.

@dawehner
Copy link
Owner

dawehner commented Oct 1, 2018

I'm curious, I don't see the generate.js being changed. Is there a reason for that? I would have expected that to change given the new code is different too.

@RalfNorthman
Copy link
Author

RalfNorthman commented Oct 1, 2018

The files in src/Colorbrewer is as they were before your latest push, except that I searched-and-replaced all occurrences of rgb with rgb255.

The Color package from 0.18 used ints from 0 to 255 as standard, while the new elm-color uses floats between 0 and 1. Therefore I had to use a slightly different function.

I'm not a JavaScript guy, so I didn't mess with that.

@dawehner
Copy link
Owner

dawehner commented Oct 1, 2018 via email

@RalfNorthman
Copy link
Author

RalfNorthman commented Oct 1, 2018

Well, they are your generated files except one automatically searched-and-replaced word (with the Vim text editor). If I would generate code from the json I would probably use Elixir.

I probably could alter the old js file to use rgb255 instead of rgb and regenerate the files with that, but that feels like some unnecessary hoops to jump through.

@dawehner
Copy link
Owner

dawehner commented Oct 1, 2018 via email

@dawehner
Copy link
Owner

@RalfNorthman I've implemented the same change by adapting the generate.js file.
Thanks a lot for your work and your especially the discussion we had. I've released a 4.0.0 version.

@dawehner dawehner closed this Oct 14, 2018
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

Successfully merging this pull request may close these issues.

2 participants