Skip to content

Access the color palette? #349

Answered by vasturiano
guerda asked this question in Q&A
Apr 17, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

@guerda the auto-color scale is just a quick convenience method for assigning different colors based on a simple logic. If you need anything more sophisticated than that, it's better you use the more appropriate nodeColor method. In fact, if you're already declaring a color scale externally, like you shown above, all you need to do is assign that color scale to the nodes. Something like:

.nodeColor(color)

With color being the color scale you've defined in your code.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@guerda
Comment options

Answer selected by guerda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants