mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
11.15k stars 2.21k forks source link

Support lab color interpolation #483

Closed tmcw closed 8 years ago

tmcw commented 10 years ago

From https://github.com/mapbox/mapbox-gl-style-spec/issues/62#issuecomment-46887921 - there are many perceptual scales, but this is a good place to start.

pnorman commented 10 years ago

:+1: to CIELAB or it's angular transformation, CIELch.

I'm doing all my colour picking in Lch these days

tmcw commented 8 years ago

Now that data-driven styles have landed, I think this is actionable.

'circle-color': {
    property: 'sqrt',
    'interpolate-color': 'lab',
    stops: [
        [0, '#f1f075'],
        [250, '#e55e5e']
    ]
}

cc @lucaswoj @jfirebaugh ?

lucaswoj commented 8 years ago

@tmcw Do you have thoughts on exposing a interpolate-color configuration option vs adopting a better color interpolation algorithm by default?