You say she is late in flower-- HOW late?
It is NORMAL for many strains to turn completely yellow, or red, or burgundy, etc... when it is near harvest because it means you fed them correctly and they produced the right carbohydrates to store in her system for late flower (Autumn in nature) when they turn color, drop leaves, and produce more trichomes (sugar) just before they die.... the colors are a form of "antifreeze" the plant produces to survive colder temperatures-- something a totally green/immature plant usually won't do.
The male/female ratio is determined early in the sprouting/early vegging period... the DNA determines the sex-- HOWEVER- because cannabis- like most plants- do not have simply regular XY factors, it is more complicated than that. There are true males/True females that can not be changed, Females/Males that can be "influenced" by their environment, Males/Females that are teetering on the edge, and any environmental stress hermies them, or genetic hermies.
There is a LOT of evidence and studies out there... mostly long-winded Botanical papers on genetics and genomes etc...
But you can not force a sex to change in a seed- but since only approximately 15% are TRUE males/females-- the rest can be 'helped along" by keeping the environment stress- free and the conditions as close to 'natural" as possible-- meaning no/low nitrogen in sprout & early veg, and lower temps, higher humidity, and bluer light during the whole Veg time, with increased nitrogen.. We have about a 1-in-40 male to female ratio because we know this and follow it.