Having a separate style for each is probably, whilst time consuming, a
more straightforward way of handling your needs. There are things you
can do to make it less long winded although it would add some
complexity and have some limitations in use of colours.
Have a play with these icons in Google Earth
http://www.thekmz.co.uk/images/misc/ico_square.png
http://www.thekmz.co.uk/images/misc/ico_square2.png
(save them away somewhere)
These are 2 simple 64x64 square icons - both have the top-left
quadrant transparent and then each has the other quadrants coloured in
some way - black, white & red or green, blue and red. If you create a
placemark in GE and use these icons for the placemark and then look to
see the result as you change the placemark colour (in edit
properties). The colour specified within the placemark is added to
that of the icon image.
So you could create an icon for each of your numbers - and associated
style and then for each colour specify that at the placemark level.
The limitation would be that the base image would have to structured
in such a way that the area you want to override has to be white ...
so when the colour is added from the placemark colour tag you get that
colour.
I spent a day earlier this week doing exactly what you are ...
creating placemark icons along a number/colour combination route. In
my case Mile/Km distance markers on 4 different colour bases. While
you can try and get fancy with something like I suggest above I chose
to create all the icons separately and go from there.
(My stuff is using the GE plugin (rather that pure KML) so there's a
bit more flexibility in that enviroment for easily creating what's
needed. Same would apply if you are generating your KML via code
somehow - I do that from database apps for example.)
As an aside - and this would only apply to the API - it was this issue
of 100's of icons that prompted me to make this feature request
http://code.google.com/p/earth-api-samples/issues/detail?id=493
... it's common, and good, practice to use Sprite Sheets and CSS to
select image icons and this technique is also available in Maps when
setting a Marker's styling. It would be great to have this available
in the API as 1 x Image <<<<<<< 100's x Image when looking at network
round trips etc.
Either way individual icons and styles is the way to go imho.
Regards
Nymor