Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept hexes as valid colors #9

Open
jmduke opened this issue May 19, 2014 · 0 comments
Open

Accept hexes as valid colors #9

jmduke opened this issue May 19, 2014 · 0 comments

Comments

@jmduke
Copy link

jmduke commented May 19, 2014

Currently the tool only accepts blue and green as valid arguments to color. The relevant code is in index.html:

function getColor(num, scale) {
  if(Config.color === 'blue') {
    // Index in the array is 1 less than the scaled_number
    return colorbrewer.Blues[scale][num - 1];
  }
  // Default to green
  else {
    return colorbrewer.Greens[scale][num - 1];
  }
}

Which is invoked in style():

color = getColor(feature.properties.scaled_value, Config.scale);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant