Hi
Yeah that was the point I got to as well.
What I'm trying to do is colour the top 5 words specific colours. I'm using this
class First5 implements WordColorer {
int callCount = 0;
public color colorFor(Word word) {
callCount++;
colorMode(RGB, 255, 255, 255);
if (callCount == 1) {
return color(2,27,65);
}
else if (callCount == 2) {
return color(0,53,173);
}
else if (callCount == 3) {
return color(0,163,224);
}
else if (callCount == 4) {
return color(209,216,227);
}
else if (callCount == 5) {
return color(204,51,51);
}
else {
return color(48,88,175);
}
}
}
Now while its possible to adapt this to colour words with the same weight the same way this could lead to dull wordclouds. So I just wanted to match the rank assigned by the array to my top 5 list so I could keep the colour list for the first 5 words, it doesn't seem to be byweight then by alphabetical or even byweight then by length, or even by the order the words are in the data file, it almost looks random.