It would be awesome to have a modularity algorithm implemented in sigma.js to color the nodes, highlighting the different communities composing the graph. Is someone working on this? :)
I'd also really like this kind of feature, probably in a form of a plugin.
I'm currently generating a gexf file with a custom "viz:color" for each node.
Here is a first try to colorize a graph node using a the topic on the node (this topic attribute is defined in the gexf file):
You'll need d3js to get the color array. I've limited the number of possible colors, but if you remove the condition on line 40, you can get colors for every clusters.
Have fun :)
That's a very interesting work! Have you ever thought of assigning a color to each node depending on its x-y position? In this way, nodes which are clustered together would have almost the same color.
I've got an updated version of the code where it's making a ranked topic array, so clusters containing most nodes will be colorized first.
Because you're launching this plugin once the graph is made, it should also be possible to attribute colors depending on nodes position.