It's possible to define random colors in .kml files. Make Marble calculate suitable values and display them. Random colors (as per colormode=random) are already read from kml files and available in GeoDataColorStyle. Extend it to implement a QColor paintColor() const method which returns, acoording to the colormode, either the original color or a randomized color. Randomized colors need to be calculated according to the kml spec, see https://developers.google.com/kml/documentation/kmlreference#colormode
Git commit 3a519c30734d0acc92c4b67c8c1df1840086c2cd by Dennis Nienhüser. Committed on 24/11/2012 at 10:56. Pushed by nienhueser into branch 'master'. Fix reading of random colormode colorstyle is an abstract kml element, so we need to check if the parent element derives from it. M +6 -5 src/lib/geodata/handlers/kml/KmlColorModeTagHandler.cpp http://commits.kde.org/marble/3a519c30734d0acc92c4b67c8c1df1840086c2cd
Git commit a5d09cd770c8a90dea4a5537a4816cb5eef94960 by Dennis Nienhüser. Committed on 24/11/2012 at 10:58. Pushed by nienhueser into branch 'master'. Fix writing random colormode. Don't write default values. REVIEW: 102611 M +12 -4 src/lib/geodata/writers/kml/KmlColorStyleTagWriter.cpp http://commits.kde.org/marble/a5d09cd770c8a90dea4a5537a4816cb5eef94960
Git commit da6a59508b17b934478b46a09ecfde0db13aaccc by Dennis Nienhüser, on behalf of Mohammed Nafees. Committed on 30/11/2012 at 22:36. Pushed by nienhueser into branch 'kitchen'. Respect KML random color mode in rendering REVIEW: 107478 M +19 -0 src/lib/geodata/data/GeoDataColorStyle.cpp M +11 -1 src/lib/geodata/data/GeoDataColorStyle.h M +4 -4 src/lib/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp M +4 -4 src/lib/geodata/graphicsitem/GeoPolygonGraphicsItem.cpp http://commits.kde.org/marble/da6a59508b17b934478b46a09ecfde0db13aaccc