2

In D3js we can map any word to a color simply by defining color scale limit. D3js scaling system manage the way to map any word into the scale for you. It seems to be much more complicated in python. Am I missing something ?

Is there a simple way in Python to get a color for a given string ?

Jaxian
  • 1,146
  • 7
  • 14
Romain Jouin
  • 4,448
  • 3
  • 49
  • 79
  • 1
    Please specify more precisely, WHAT d3js actually does or at least link some source (code) – allo Jun 20 '16 at 12:10
  • [You can use color bars from matplotlib, and choose a set of discrete colors, as shown in the following answer from stack overflow.](http://stackoverflow.com/questions/14777066/matplotlib-discrete-colorbar) – mtadd Jun 20 '16 at 12:54
  • A dict of colour names and RGB values? – Robert Longson Jun 20 '16 at 14:37

0 Answers0