You are completely discounting environmental factors that very, very much impact these equations.
A case in point is the sickle-cell anemia gene. Yes, carriers lose 1/4 of their children to sickle cell. They also lose a significant number of their homozygous-not-sickle-cell-gene children in areas where malaria is a significant risk. Yet those are the very regions of the world where the trait is the most common. Why? Because their remaining heterozygous children survive better and reproduce better than homozygous-not-sickle-cell-gene people.
Oh, wait, you say - what if being homozygous confers NO advantage. OK, sure - but your scenario only applies when all other factors are equal between reproducing partners. Wealthy parents may have the resources to endure loss of 1/4 of their children (albeit with considerable heartache) and still have enough left over to give their surviving 3/4 children sufficient nutrition, health, education, and other advantages that those children still leave more descendants than lineages without the problem gene. This can arise both with “founder effects” where an individual has a disproportionate number of descendants in a community due to a genetic bottleneck, or in the case of royalty where wealth and status can overcome the liability of inherited problems (up to a point - if things get bad enough the lineage ends regardless - see Carlos II of Spain)
It is really hard to eliminate recessive traits entirely because they are recessive - they can hide for generations, being passed down silently from parent to child, only to pop up when two carriers happen to meet and marry.
If you’re referring to the OPN1MW gene variants you are mistaken. One copy of OPN1MW in men, or two in women, confers normal color vision. OPN1MW2 is a variant. One copy in men leads to deuteranamalous trichromacy due to a shift in the sensitivity of the photosensitive pigment it codes for. That is often called “colorblindness” but it’s more a weakened sensitivity. Deuteranamlous people DO see green, but a slightly color-shifted green and they will describe some borderline colors as “blue” or “yellow” sooner than someone with normal color visions, but it is not as great an impairment as many believe. (This is in contrast to deuteropia, which is a true inability to perceive the color green and is a different allele). A woman can only have deuteranomaly if she has TWO OPN1MW2 genes, one on each X chromosome - in which case she is “colorblind” (and it does happen, myself being the possessor of most likely two OPN1MW2 genes - I haven’t been tested by statistically my deuteranomalous trichromacy is far more likely to be the result of two OPN1MW2’s than a heterozygous condition with statistically unlikely shutdown of every OPN1MW X chromosome in my retinas).
ONLY heterozygous women - those with one OPN1MW allele and one OPN1MW2 allele - are tetrachromats, and only some of them because one X chromosome is deactivated every cell and it’s thus possible for all of a woman’s retinal cells to have the same X deactivated, so it’s possible for a heterozygous woman to have either normal vision, OR deuteranomaly, OR tetrachromacy depending on how the dice roll.
(In the rare case a man has two X chromosones - Klinfelter’s syndrome with XXY chromosomes or and XX-male - then he has the possibilities that women do and thus it is possible but probably extremely rare that you could find a tetrachromat human male. But reproduction in his case is also extremely unlikely)
So, in fact, two of the same gene in a woman confers EITHER normal vision OR colorblindness, but not tetrachromacy. The male offspring of of a tetrachromat woman will be half colorblind and half normal vision. Half her female offspring will either have normal color vision or might be tetrachromats… unless she marries a man colorblind due to the OPN1MW2 allele in which case half her daughters will be heterozygnous and the other half colorblind.
If you are referring to a different color vision gene/allele please let me know as I’d be interested in learning more about it.
You also seem to be confusing visual acuity with color perception. Outside of achromotopsia, those with abnormal color vision usually have completely normal acuity. Their eyes focus images just fine, they just don’t process certain parts of the spectrum. On the flip side, you can have normal color perception and completely wonky visual acuity. They aren’t the same thing at all.
OK, wait - first, we are not “most mammal species”. Most mammal species are LESS dependent on vision than humans and primates are. Some mammals are even monochromats (primarily sea mammals like pinnepeds and cetaceans). Trichromats in mammals are pretty much just the primates and some marsuipials.
Even among primates, not all are trichromats. Among New World monkeys it’s not unusual for all the males to be dichromats and only some of the females trichromats… yet they manage to survive quite well. It’s possible that primate ancestors lost some color perception and later species - such as ourselves - had to re-evolve it.
Even among humans, color weakness or even full-out colorblindness is not as debilitating as many with color-normal vision assume. We do not rely entirely on vision when seeking food, after all, there are other cues such as odor and texture.
Yes, there may be environments where extreme sensitivity to color variations could be crucial to survival… but if so we’re screwed because pretty much ONLY women (and a few men with genetic anomalies that usually prevent reproduction) can be human tetrachromats. Meanwhile, the colorblind often have better pattern recognition than color normal humans, which may be an advantage in other situations. If you’re looking for brightly color fruit against a green background then yes, color perception is important. If you’re looking for, say, green leafy plants against a background of other green plants then pattern/form recognition could become more important, or altered color vision that allows certain types of green to stand out more against others (a situation where a deuterope perceives a fruit as more yellow than someone with normal color vision, for example).
There are populations where color vision anomalies are more common than others, and they aren’t always highly isolated populations. The color anomaly alleles are most common in Europe/Northern Europe and least common in Africa. Who knows why for sure? Maybe color vision is less important in the environment of Europe, or more important in Africa or maybe there was some sort of founder effect at work or some combination.
It does seem that a lot of seemingly simple genetic stories are a lot more complicated once you scratch the surface.
Even among primates, not all species are trichromats