I've been trying to change the colors in my sunburst plot using sunburstR. I df have 3 levels (level 1 to 3 from centre) and the size. I create the plot fine just using the sunburst(df) but I would like for the colors in level 2 and 3 to match the color in level 1 but using different shades.
sunburst(df)
I've tried defining colors and lebels as suggested here How to specify the colors and toggle labels for each category in R sunburst? but the best I get is:
I actually would like for subsets in level 2 and 3 to have the same level 1 (centre) color but different shades.
I hope you can help me. Thank you very much
It sounds like all you need to do is add the extra two transparency characters for the hex codes.
https://stackoverflow.com/questions/23201134/transparent-argb-hex-value#:~:text=Transparency%20is%20controlled%20by%20the,mixed%20with%20the%20background%20color.
In R, these two extra characters fit on the end of the hex code. For example, #c994c7 is the root color and #c994c780 has 50% transparency.
1.4m articles
1.4m replys
5 comments
57.0k users