question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use CartoColor in input color fields

See original GitHub issue

Context

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

  1. Create a new / use an existing map
  2. Go to Style
  3. Click on input color
  4. Click on Style by value

captura de pantalla 2018-02-01 a las 14 49 28

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:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
makellacommented, Feb 23, 2018

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

flip-ramp

0reactions
alrocarcommented, Oct 1, 2019

Stale issue. Closing 👋

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found