That would be very cool if the background color of the splash could be synced with the icon dominant color. I have been told that Etienne would like to have fun with that :)
Hmm...that sounds quite similar to what we do with FxAndroid Web Apps. I'd suggest taking a look at their implementation as a point of reference. I'm ccing wesj in case you have questions on that implementation.
Created attachment 754233 [details] Wip |getLaunchColor(icon)| function Here's a wip |getLaunchColor(icon)| function. (icon should be an image element) Any pointer on where to look for the FxAndroid code / who could give me feedback on the math would be greatly appreciated :)
Gecko has a built in ColorAnalyzer.js that you should use if you can. I rolled our own in Java because it didn't exist at the time and bridging the xpcom and Java is non-trivial. Its an xpcom component which may make it harder to use for you guys. http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/ColorAnalyzer.js http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/mozIColorAnalyzer.idl