Representing notes with colors always results in important pros and cons, also depending on the chosen approach.
First of all, we should always remember that human color perception presents issues in being able to distinguish the relation between colors, and that colors are actually an abstract representation of wave length of light.
A pair of colors, even when closely related in their wave length, may seem more "different" than others. That's why shades going from green to red normally show more visually important changes than going from red to blue.
Then, we should remember that there are lots of people with various levels of color blindness, for which some colors or shades simply do not exist, as they look completely identical to other shades a "normal" color perception would allow.
Finally, there's the problem of the approach in color choice: considering that there are not so many distinct colors to define the whole "note palette" the human hear could perceive, the common approach is to just repeat the color range every octave. But, then, how shades between colors should be chosen? Even in the octave realm, we have 12 distinct notes, and choosing 12 colors that are equally "distant" while having each one distinct characteristics is fundamentally impossible.
There are at least two common choices.
Following the scale sequence (either diatonic or chromatic)
Using the chromatic scale may be useful in contexts in which melody and diatonic scale are the main reference: the octave uses a circular color spectrum (hypothetically from Cx to Cx+1), with closed notes having similar shades.
This is quite helpful in primary music learning, where the diatonic scale is the main reference and its alterations show the similarity with the fundamental notes of that scale.
Notes are usually played/shown individually, in linear form (we could use the term "melody"), and "distant" colors help understanding the relation between each note, possibly within a sequence.
The sequence usually follows the color spectrum (normally starting with red for C), and is quite intuitive for children and beginners.
Typical examples are the Boomwhackers already reported in other posts:
which is probably based on some Orff Schulwerk aspects, as shown in the Sonor Orff Glockenspiel:
Note how some notes seem to be more distinct than their "neighbours". Most importantly, colors that are "brighter" to human perception seem to be more recognizable than others, so the difference between C and D seems "smaller" than that between E and F.
Another important drawback of this approach is that important consonances (starting with the perfect fifth) have quite different colors, showing no visual correlation, even if there could be. If taken out of the context of a full scale, two notes having quite "similar" colors will not sound well when played together: imagine having the full chromatic set of boomwhackers, taking the lowest C and finding the octave above only based on its color.
Using the circle of fifths
This approach is theoretically more "acoustically consistent", as notes with simpler mathematical factors are also closer in the color spectrum. C will have a color that is closer to F or G, also showing a slight correlation between those two.
Here is the alleged color system used by Scriabin for his Prometheus, to be played on the [Clavier à lumières](clavier à lumières):
We can clearly see the relation between colors and fifths, but also an issue similar to the above approach: some colors seem more distant than others. For instance, while having the same distance in the color spectrum, E♭ and A♭ seem much closer than D and A.
In general, colors "going flat" are more similar and less bright than their counterparts.
Trying color alternatives doesn't change that much. Here is an example that uses the full chromatic spectrum, equally divided in 12 steps:
In any case, using fifths presents an issue that is the opposite of the above: closer notes (C, C♯) have extremely different color, which is quite unintuitive when exploring the alterations of a diatonic sequence, or, simply put, how close notes are depicted. Showing the notes arranged in a piano keyboard make everything less intuitive:
While some efforts could be made by trying to find colors that have more similar brightness, the problem remains: either some equal intervals will show more "distance" than others, or most colors would be too similar.
For example, using the same color spectrum concept, but applying different brightness:
Finally, a trivial but still important problem: both systems above naturally chose red for C. But is it a valid choice?
Maybe, we could use brighter colors for more common "notes" or "keys" (eg. green or yellow for C), with "paler" ones for less common ones.
It would make also sense, though, to do the opposite, so that less common keys and notes would shine, highlighting their distance.
As you can see, while note colouring may be useful and/or interesting to use and explore in some contexts, it always shows some form of weakness, no matter the approach.
There are obviously many possibilities (I only explored a few), but, at least for the most common, intuitive and logic methods, finding which one is better or if it "makes sense" just depends on the context of its usage.
And it doesn't matter what toppings you prefer, just remember the basic rule: pineapple on pizza is an abomination ;-)