Use CartoColor in input color fields
See original GitHub issueContext
Related issue: https://github.com/CartoDB/cartodb/issues/9002
We are currently using a hardcoded ramps
object in Builder to display the different available color ramps in markers color input. This can be found in this file.
However, I think it is better to get the ramps from our CartoColor library in order to be more consistent. This is the approach we have followed in this PR for qualitative values. In my opinion, we should remove this file and use CartoColor instead.
What do you think?
Steps to Reproduce
- Create a new / use an existing map
- Go to
Style
- Click on input color
- Click on
Style by value
Current Result
Color ramps are being taken from a hardcoded ramps.js
file.
Expected result
Color ramps should be taken from CartoColor.
Additional info
In the PR mentioned above, we have created a helper to get ramps by name and number of required colors.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
caret-color - CSS: Cascading Style Sheets - MDN Web Docs
The caret-color CSS property sets the color of the insertion caret, the visible marker ... <input value="This field uses a default caret.
Read more >Caret Color - Tailwind CSS
Use the caret-{color} utilities to change the color of the text input cursor. Focus the textarea to see the new caret color.
Read more >Change the color of a input-field when selected - Stack Overflow
I want to change the border-color of a input type="text" field when it is selected. Atm the border gets blue when i click...
Read more >Add a parameter to let the user flip the color scale #35 - GitHub
Add a parameter to let the user flip the color scale #35 ... Use CartoColor in input color fields CartoDB/cartodb#13481.
Read more >CARTOColors | CARTO
Custom color schemes built on top of well-known standards for color use on maps, with next generation enhancements for the web and CARTO...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hey @elenatorro!
so let’s not use those old ones in
ramps.js
!take a look why in this presentation slide
In that green palette, look at what we were doing! bad, bad…
I have always wanted Builder to read in the names of the schemes instead listing out the color values as seen here: https://github.com/CartoDB/cartodb/issues/9528
We have to also consider the “flipping” option that we currently have and how we would read in the inverse of the scheme when that is done (gif below).
Ideas here: https://github.com/CartoDB/turbo-carto/issues/35
Stale issue. Closing 👋