In Devarim 17:8 the Torah distinguishes “between [niddah] blood and [non-niddah] blood.” See Rashi there, who draws from the discussion in Tractate Niddah 19b. This is the basis for the enumeration of niddah colors and non-niddah colors in the mishnah, gemara, and poskim.
The leniencies of stains (see our article ketamim) are based on the Torah’s use of the term “bivsarah” (“in her flesh” Vayikra 15:19) in explaining what is considered niddah on a Torah level (see Tractate Niddah 58a,b).