We need to discuss how to implement color scaling between a start and end color using TurboCARTO. The reason that this is so important is for a couple of main reasons:
people will want to use their brand or identity colors
we need to support unclassed maps
Example: Classed Choropleth
Example syntax would be:
-fill: ramp([attribute], (#275372,#36729E), jenks(7));
in the background, we would generate a color ramp in a perceptual colorspace like Lab or LCH and generate a 7 color color scheme.
The output map would be something like this:
Example: Unclassed Choropleth
The good news is, TurboCARTO is built to support unclassed mapping. To streamline this for the user, we need to take their [attribute], use their start and end colors as our range( ) and automatically interpolate between the two colors based on the number of unique values that exist in the data.
Example syntax would be:
-fill: ramp([attribute], (#275372,#36729E), unclassed);
in the background, we would count the number of features and generate a color ramp in a perceptual colorspace like Lab or LCH and generate as many colors as there are features
Here is an example unclassed map.
I used an external tool to generate a color scheme between #275372,#36729E for 56 steps (the number of features in the dataset).
Each polygon is assigned a unique color based on its value in the data
Current Workflow
Users would need to know tools available for ramping between two colors,
count the number of features in their data and create that many colors between the start and end,
understand perceptual color spaces and their importance with sequential data,
We need to discuss how to implement color scaling between a start and end color using TurboCARTO. The reason that this is so important is for a couple of main reasons:
Example: Classed Choropleth
-fill: ramp([attribute], (#275372,#36729E), jenks(7));
The output map would be something like this:
Example: Unclassed Choropleth
The good news is, TurboCARTO is built to support unclassed mapping. To streamline this for the user, we need to take their
[attribute]
, use their start and end colors as ourrange( )
and automatically interpolate between the two colors based on the number of unique values that exist in the data.-fill: ramp([attribute], (#275372,#36729E), unclassed);
Here is an example unclassed map.
#275372,#36729E
for 56 steps (the number of features in the dataset).Current Workflow
Getting Started
There is definitely more to discuss about this, but would love to get the conversation started.
cc @saleiva