When attempting to model the transition from normal trichromacy to a functional 4-dimensional tetrachromatic color space—such as in true-red non-retinal tetrachromacy (TRNRT)—a fundamental mathematical problem arises: How do we accurately calculate the number of functional, discrete color steps a biological cone type can produce when its spectral sensitivities overlap with other cones?
In an exemplary digital color space (like the 0–255 RGB subpixel levels on a monitor), colors are generated by combining completely distinct primary channels. However, biological photoreceptors (cones) do not operate in perfectly isolated channels; their spectral sensitivities overlap heavily. Simple overlap penalties—which just linearly subtract competing cone signals from a target cone's signal—break down when modeling complex tetrachromatic or dichoptic visual systems. They suffer from two major mathematical flaws:
The Bystander Deflation Effect: If multiple cones overlap the target cone in the same spectral region, basic subtraction punishes the target cone multiple times for the exact same overlapping wavelength, artificially crushing its calculated functionality.
The Information Preservation Paradox: If a fourth cone type is a near-perfect duplicate (a clone) of an existing cone (e.g., L- and L+ cones), simple subtraction mathematically assumes they catastrophically interfere with each other, dropping the resulting signal to zero. Biologically, this is incorrect. Two overlapping, identical cones do not destroy a color axis; they share it.
To solve this, I developed the Effective Primary Resolution (EPR) Algorithm. While it utilizes foundational concepts of linear algebra and colorimetry, the algorithm in its entirety is completely novel. It mathematically bridges the gap between raw biological spectral sensitivities and bounded digital color gamuts, calculating the true combinatorial potential of a visual system.
The 4D Tetrachromatic EPR Formula
Below is the 4D tetrachromatic EPR algorithm written as a modern Excel LET function. To make it easily readable, I have replaced the raw cell references with descriptive placeholders.
In this scenario, the algorithm calculates the functional resolution of a Target Cone (e.g., the Q cone) evaluated against three Competitor Cones (e.g., M cone, S cone, and L cone).
Effective Primary Resolution (EPR) Algorithm
=LET(
PeakWavelengthRow; MATCH(OptimalPrimary_Wavelength; Wavelength_Range; 0);
TargetCone; INDEX(Target_Curve; PeakWavelengthRow);
Comp1; INDEX(Competitor1_Curve; PeakWavelengthRow);
Comp2; INDEX(Competitor2_Curve; PeakWavelengthRow);
Comp3; INDEX(Competitor3_Curve; PeakWavelengthRow);
Corr1; MAX(0; CORREL(Target_Curve; Competitor1_Curve))^2;
Corr2; MAX(0; CORREL(Target_Curve; Competitor2_Curve))^2;
Corr3; MAX(0; CORREL(Target_Curve; Competitor3_Curve))^2;
Weight1; Comp1 * (1 - Corr1);
Weight2; Comp2 * (1 - Corr2);
Weight3; Comp3 * (1 - Corr3);
UniqueDimension; IFERROR(100 * MAX(0; TargetCone - MAX(Comp1; Comp2; Comp3)) / TargetCone; 0);
SplitFactor; TargetCone / (TargetCone + (Comp1*Corr1) + (Comp2*Corr2) + (Comp3*Corr3));
FusedDimension; IFERROR( (100 * MAX(0; TargetCone - MAX(Weight1; Weight2; Weight3)) / TargetCone) ^ SplitFactor; 0);
MAX(UniqueDimension; IFERROR(FusedDimension; 0))
)
EPR: Step-by-Step Breakdown and Color Vision Context
To understand how this algorithm accurately simulates dimensional color volume, we must break down its sequential phases:
Phase 1: Peak Anchoring (TargetCone, Comp1, Comp2, Comp3)
Instead of integrating the entire muddy spectrum, the EPR algorithm drops an anchor at the exact nanometer where the target cone is most isolated (its dynamically pre-calculated optimal primary wavelength). Digital color gamuts are constructed by drawing straight lines between the purest anchor points (primaries). By evaluating the system exclusively at these peaks, the algorithm perfectly simulates how a visual system extracts the highest-contrast signals to establish the boundaries of its color space.
Phase 2: The Envelope Penalty (UniqueDimension)
This phase calculates the standard "Clean Signal". It asks: At this cone's peak, how much of its signal protrudes above the single tallest competitor? By using a MAX envelope rather than mathematically summing the competitors together, I eliminate the Bystander Deflation Effect. The target cone is only penalized by the dominant overlapping signal, accurately reflecting biological opponent processing.
Phase 3: Clone Detection (Corr1, Corr2, Corr3)
To solve the Information Preservation Paradox, the algorithm calculates the squared Pearson correlation (R^2) between the full spectral curve of the target cone and each competitor. If a new cone is a distinct, orthogonal dimension (like a deep violet Q-cone), the correlation is near 0. If the cone is a dichoptic clone (like the L+ cone to the L- cone), the correlation approaches 1.
Phase 4: True Axis Strength (Weight1, Weight2, Weight3)
Here, each competitor is weighed by its structural dissimilarity (1 - R^2). If a competitor is a functional clone, its weight drops to zero, effectively hiding it from the subsequent penalty calculation. This ensures that the core color axis (e.g., the Red-Green axis) is not mathematically crushed just because the brain is receiving redundant data from a second, identical cone.
Phase 5: Dimensional Compression (SplitFactor and FusedDimension)
This is the algorithm's cornerstone. While cloned cones do not destroy a color axis, they also cannot exponentially multiply the total color volume. A 100-step dichromatic system has 10,000 colors. If you add a third identical cone, the volume does not magically inflate to 1,000,000 colors. To account for this, the algorithm calculates a SplitFactor: Out of all the cloned signal present at this wavelength, what fraction belongs to this specific cone? The formula takes the True Axis Strength and raises it to the power of the Split Factor. If two identical L-cones perfectly split the signal, the formula applies an exponent of 0.5 (equivalent to a square root). When the final dimensions are eventually multiplied together to find the total color volume, these identical twins mathematically fuse back together to accurately recreate the exact dimension of a single, healthy cone.
Phase 6: The Synthesis (MAX(UniqueDimension; FusedDimension))
Finally, the algorithm safely evaluates two realities and takes the best outcome: the UniqueDimension or the FusedDimension. It fluidly self-adjusts whether it is fed a normal trichromat, a mutated anomalous trichromat, or a fully dichoptic hexachromat, outputting the exact functional percentage of the cone.
The Purpose, Capabilities, and Context of the EPR Algorithm
To fully grasp the value of the Effective Primary Resolution (EPR) Algorithm, it is helpful to look at how it fits into the broader landscape of modern color science.
Recently, researchers like Lee et al. have made incredible strides in modeling human SMQL tetrachromacy by using geometric dimensionality reduction methods. By analyzing the continuous spectrum of light, they have been able to mathematically map the continuous topological shapes of higher-dimensional vision, brilliantly predicting structures like a 4D object color solid, a 3D chromaticity ball, and a 2D spherical hue manifold.
While these traditional geometric and statistical methods are fantastic for visualizing the continuous shape of a theoretical color space, they are not designed to translate that shape into bounded, combinatorial digital steps. If I ask a continuous topological model, "Exactly how many discrete digital colors can this specific eye distinguish on a monitor?", it yields a continuous geometric shape, not a definitive combinatorial number.
The EPR algorithm was built specifically to bridge this gap. It does not replace geometric topological modeling; rather, it serves a completely different, highly specialized purpose: translating overlapping biological sensors into discrete, digital hardware constraints.
Here is a breakdown of what the EPR algorithm is designed to do, and where its limitations lie:
What the EPR Algorithm Excels At:
Discrete Combinatorial Mapping: The algorithm is purpose-built to output bounded, absolute percentages. These percentages seamlessly translate into discrete digital steps (such as 0–100 or an 8-bit 0–255 per channel), allowing me to calculate the exact combinatorial color volume—the absolute number of distinct colors—an eye can practically perceive.
Resolving Biological Redundancy: Standard projection matrices often require cone mechanisms to be perfectly linearly independent; if they are not (such as with functional clones), the math can break down or merge the variance, losing the biological nuance. Through its Dimensional Compression phase, the EPR algorithm mathematically embraces redundancy. It gracefully calculates how two near-identical physical sensors split a single opponent axis without artificially inflating the total color volume.
Anchored to Physical Primaries: Rather than analyzing the entire spectrum blindly, EPR evaluates specific, pre-calculated anchor points. This natively mimics how biological opponent channels actually extract high-contrast signals, and exactly how digital RGB displays form their gamuts—by drawing straight mathematical lines between the purest, most isolated peak wavelengths.
Limitations and Constraints of the EPR Algorithm:
Anchor Dependency: The EPR algorithm cannot blindly discover a visual system's optimal primary wavelengths on its own. It has a strict dependency on being fed dynamically pre-calculated optimal peaks. If the algorithm is anchored to the wrong primary wavelengths, its resulting purity scores will be inherently flawed.
Not a Topological Mapper: The EPR algorithm will not draw the continuous boundary of a 4D object color solid or plot the surface of a hue sphere. It relies on a different algorithm to map the continuous space; EPR's job is strictly to calculate the functional resolution of the axes inside that space.
A Novel, Bespoke Metric: Unlike universally standardized statistical tools, the EPR algorithm is a completely novel, custom-engineered mathematical bridge. Because it introduces new concepts like "Dimensional Compression" to solve the Information Preservation Paradox, its underlying mechanics require thorough explanation when presented in academic contexts.
Ultimately, while traditional colorimetry beautifully maps the theoretical, continuous geometry of what an observer might see in the natural world, my EPR algorithm models the discrete, combinatorial reality of photoreceptor overlap. It tells us exactly how much pure signal survives that overlap, allowing us to calculate the precise digital parameters required to actually fabricate those colors on a screen or a print.