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

Custom palettes #6

Open
fsvieira opened this issue Aug 16, 2016 · 2 comments
Open

Custom palettes #6

fsvieira opened this issue Aug 16, 2016 · 2 comments

Comments

@fsvieira
Copy link

fsvieira commented Aug 16, 2016

Hi,

I think it would be a great addition to leaflet-coverage if users are able to change or make a custom palette, the palette could have custom ranges values and colors.

Also it would be cool to have predefined palettes that would paint any map, using percentage instead of values, percentages would be calculated based on min max values of the map.

@letmaik
Copy link
Contributor

letmaik commented Aug 17, 2016

Inspiration for implementation: http://matplotlib.org/users/colormapnorms.html

@letmaik letmaik changed the title Custom Pallets Custom palettes Oct 19, 2016
@pzaborowski
Copy link

pzaborowski commented Apr 26, 2024

There is now option to provide pallet in this way.

var _palette = {
    red:    [0,167,116,71,38,18,255],
    green:  [0,233,229,229,229,229,0],
    blue:   [255,213,165,57,39,20,0],
    steps: 7,
    paletteExtent:[0,2],
    interpolation: 'linear'
    }
...
layer = C.dataLayer(cov, {parameter: p.key, palette: _palette})

not as the one provided in separate link, but looked into the implementation and many todos. Actually it implements only linear palette where I needed to use Poisson visualisation I needed to generate looong one with all the 100 values.

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

No branches or pull requests

3 participants