Black Lives Matter. Please consider donating to Black Girls Code today.

Working with colours

Dear all, I would like to start taking advantage of some of the colours features in Plotly.

Specifically I have couple of questions:

  1. How can I get a n-array of values out of a px.colors.sequential. ie.: how can I get the 32 values that interpolate the px.colors.sequential.Viridis range?

  2. If I have multiple graphs, with different y-axis Max values. how can I set the same colour for the same value across multiple graphs. In other world, how can I define the range of the colour to be independent from the max-min in the y values?

  3. are there any function for colour value manipulations. Ie.: is there a function that given a colour, returns the 10% lighter colour? (I know d3 has something like that, and I was wondering if that was exposed to the Python api of the library).

Thanks in advance to everyone answering!
snick