Skip to main content

Dual Implementation

Monolex maintains identical color algorithms in two languages, each serving a different purpose.

The Transform Pipeline

Every color passes through seven steps. Here’s the complete flow.

Performance Architecture

The Tint System is optimized for speed at every level.

The Coordinate Dance

Colors constantly switch between two coordinate systems.

Development Workflow

Theme designers use TypeScript for experimentation, then Rust runs in production.

The Math is Language-Agnostic

The Gestalt Color System works the same in any programming language.

Key Takeaways

  1. Dual implementation - Rust for production speed, TypeScript for design convenience
  2. Precomputation wins - Theme parameters converted once, used millions of times
  3. LRU cache - Most colors are repeated; cache hit rate > 80%
  4. Coordinate dance - Polar for identity, Cartesian for transitions
  5. Math is universal - Same algorithm works in any language

Architecture Overview

Return to Tint System architecture