Rice has a long history as a staple food consumed by half of the world’s population. Compared with white rice (WR), colored rice (CR) has more nutritional value because it contains rich active ingredients. In this study, the potential mechanism of CR (red rice (RR), green rice (GR), black rice (BR), and purple rice (PR)) for immunomodulation was explored by UPLC-Q-TOF, network pharmacology, and cell experiment. kuromanin, kaempferol-3-O-arabinoside, keracyanin, guajavarin, and hispidulin in CR were the critical components for improving immunity. These ingredients are mainly found in BR. Cell experiments supported that kuromanin plays a role in maintaining immune homeostasis. In the normal environment, it promotes cell proliferation and improves DNA repair; In an inflammatory environment, it binds to AKT1 and reduces the release of inflammatory factors through the MAPK and NFKB signaling pathways. The study provides a guideline for humans to utilize the precise nutrition of CR.