However as a botanist I can tell you it is also not true.
Neither is the (freakin’ weird) idea that some peppers are ‘male’ and others ‘female’.
Sorry to be ‘that guy’, but this is how it works...
Their DNA predetermines the maximum amount of pigments they can produce, which creates this variation in colour.
Peppers just have a mutation that makes them incapable of producing the chemical capsaicin, which gives chillies their fieriness.