I seem to remember another Arduino ambilight project, but I suspect the colour detection was done elsewhere.