gka / chroma.js

JavaScript library for all kinds of color manipulations
https://gka.github.io/chroma.js/
Other
10.13k stars 545 forks source link

Logarithmic scale #292

Open muazamkamal opened 2 years ago

muazamkamal commented 2 years ago

Creating a logarithmic scale seems to be giving the same scale as default. I created the log color scale by following the example from the README.

chroma.scale(['lightyellow', 'navy']).domain([1, 100000], 7, 'log');

Viewing the colors it generates seems to be no difference to normal scale. Refer to this codepen. image

Attempting to pass a wide-range value for the scale to map also shows no difference to normal scale. Refer to this stackblitz. image

How is the log option supposed to be used and what exactly does it do?