If you think of a photodiode as a single pixel camera, you can make a very low resolution color detector by using three of them. Either get ones that target the color frequencies you care about or get ones that sense full spectrum daylight and put translucent gel in front of each to allow you to measure the red, green, and blue. Normally, an op amp circuit is recommended for conditioning the photodiode output, but if you don't need high precision or high speed, you can do pretty well with the photodiodes connected directly to analog inputs. I've built a couple of gadgets for measuring the level of illumination in a skylight or indoors this way.
Code:
void setup() {
pinMode(PHOTODIODE_CATHODE_RED, INPUT_PULLDOWN);
pinMode(PHOTODIODE_ANODE_BLACK, OUTPUT);
digitalWriteFast(PHOTODIODE_ANODE_BLACK, 0);
}
int readLight() {
const auto count = 1024L;
digitalWriteFast(PHOTODIODE_ANODE_BLACK, 1);
auto sum = 0L;
for (auto i = 0L; i < count; ++i) {
sum += analogRead(PHOTODIODE_CATHODE_RED);
}
digitalWriteFast(PHOTODIODE_ANODE_BLACK, 0);
return sum / count;
}
The photodiode I'm using is an ancient PBX81-1.
Note, I do not know if this would work as well on a T4.1 as it does in my case. I've done this with T3 and T LC.