Seeking advice on how to create a lighter color for a child element based on the parent's color. The code I currently use generates random colors as shown below:
var color = d3.scale.category20b(); .style("fill", function(d) { return color((d.children ? d : d.parent).name); })
This results in a random color for each node, like the first image linked here: first image : random colour
However, what I am aiming for is a gradient effect where the child's color is lighter than the parent's color, as seen in this example image: Gradient colour
If anyone has suggestions on achieving this effect, it would be greatly appreciated. I have included links to my result images due to restrictions on posting images directly. Thank you.