Conventional carbon dots (CDs) typically exhibit substantial variations in fluorescence intensity across different pH. This limitation underscores the pressing need for advancements in their stability and performance under diverse environmental conditions. Herein, l-cysteine and neutral red are selected as precursors, and three kinds of CDs, which can emit red, orange, and green fluorescent light (assigned as r-CD, o-CD, g-CD, respectively), are synthesized by simply changing the reaction conditions. The pH resistance of r-CD and o-CD in acidic and alkaline environments was demonstrated. A fluorescence detection system for natural flavonoid apigenin was established with r-CD, as r-CD exhibited obviously selective quenching of apigenin, without obvious response to other analogs. The linear range of apigenin detection was divided into low concentration at 2.85-30 μmol L