When the fruits are green, they get this color from chlorophyll. When they progress from maturity to ripening, they produce a naturally-occurring hormone called ethylene. The ethylene initiates the ripening process, triggering the fruit to start turning red and also to soften.