Skip to main content

Overview

The Monolex Tint System is implemented in both Rust (Production) and TypeScript/JavaScript (Lab/Tool). Both implementations follow the identical Gestalt Core-Flow pattern and are algorithmically equivalent.

Core Functions Comparison

warp_hue_compress (CORE Function)

Role: Hue compression inside the Caustic region - OkLCH Polar space operation
Both Rust and TypeScript implement this algorithm identically. The pseudocode in the diagram above describes the complete logic. Both languages use standard circular arithmetic (modular wrapping to [0, 2pi]) and handle inside/outside zones with the same compression and expansion formulas. Gestalt Core Analysis:

fill_with_oklab_gradient (FLOW Function)

Role: OkLab linear interpolation inside Caustic region - Cartesian space operation

apply_hue_warp (CORE + FLOW Hybrid)

Mode Comparison:

Parameter Mapping

Full Parameter Table

Numeric Precision

Float Type Comparison

Practical Impact

OkLab Implementation

Both implementations use the standard Bjorn Ottosson OkLab matrices (M1 for RGB-to-LMS, M2 for LMS’-to-OkLab). These are publicly documented at bottosson.github.io/posts/oklab.

Development Workflow

Verification Summary

THE CENTER

Language-Agnostic Pattern

The dual implementation proves that Gestalt Core-Flow is a language-independent mathematical pattern.
Key Insight: Gestalt Core-Flow is the mathematical language of color manipulation. Whether implemented in Rust, TypeScript, Python, or GPU shaders, the same pattern produces the same results because it is grounded in mathematics, not implementation details. This makes the Tint System:
  • Portable: Same algorithm works everywhere
  • Verifiable: Test in JS, confident in Rust
  • Maintainable: Single source of truth (the math)
  • Extensible: Add new platforms without redesign

Back to Tint System Overview

Return to the TrueColor Tint System architecture overview