Eventually, you would want to teach them to map the color to the chord name and recognize the root of the chord. But that can be learned any time.
Also keep in mind that if a kid learns all the colors, you'll want to continue practicing to "bridge" over the age where they would lose the ability to recognize perfect pitch. If they mastered this at age 4, they could still potentially lose the ability if they don't practice during that period.
“Perfect Pitch: When you throw a banjo into a trash bin and it lands on an accordion.”
KomoD•2h ago
I found some papers suggesting it is possible for adults, but more difficult.
https://pubmed.ncbi.nlm.nih.gov/31550277/
https://pubmed.ncbi.nlm.nih.gov/31686378/
https://www.researchgate.net/publication/388931575_Learning_...