The Scientific Method: Why HSL?
Many color pickers use the RGB space, which is great for screens but unintuitive for humans. Kasuality adopts the HSL (Hue, Saturation, Lightness) space as a control interface.
- Hue: The pure essence of color (e.g., 0° is Red, 120° is Green).
- Saturation: The intensity of the color. 100% is vivid, 0% is gray.
- Lightness: The amount of light. Crucial for creating tints and calculating contrast.
Thanks to this approach, Kasuality calculates harmonies mathematically by rotating only on the H value. However, under the hood, we have integrated a fundamental innovation.
Perceptual Uniformity: The OKLCH DNA
While HSL allows us to set the creative direction, our rendering engine uses the OKLCH color space. This ensures that every shade is perceived with the same intensity by the human eye, correcting the distortions of old systems.
Native Wide Gamut (P3)
Designed for modern displays. We generate colors that old HEX/RGB systems cannot display, maintaining compatibility through Progressive Enhancement.
Perfect Gradients
The OKLCH algorithm eliminates gray "dead zones" in the middle of gradients, ensuring fluid, vibrant transitions that respect the physics of light.
Decoding Harmonies
In the "Harmony" section, our algorithm visualizes geometric relationships on the color wheel:
Complementary
Two opposite colors (180° apart). Create maximum visual contrast and energetic impact. Ideal for CTAs.
Analogous
Adjacent colors on the wheel. Share the same emotional "temperature" and are very relaxing to the eye.
Triadic
Three equidistant colors (120°). Offer vibrant balance, maintaining harmony and distinction between elements.
Golden Ratio
Harmony based on the golden number (φ) and the angle of ≈ 137.5°. Generates palettes that appear intrinsically natural and organic.
Hybrid Accessibility: WCAG 2.1 and APCA
Kasuality doesn't stop at the present but anticipates the future of the Web (WCAG 3). Our contrast engine operates on two levels simultaneously:
- Level 1 - Legal Standard (WCAG 2.1): We calculate the classic mathematical ratio AA (4.5:1) and AAA (7:1). This is the current required legal standard.
- Level 2 - Perceptual Science (APCA): We integrate the new Advanced Perceptual Contrast Algorithm. Unlike the old system, APCA (value $L^c$) considers how the human eye actually perceives text.
- Simulation: Applies SVG filters for Protanopia, Deuteranopia, and Tritanopia, and tests rendering under direct sunlight or in night mode.
Guide to the 5 Modes
Design Tokens Architect & W3C Export (PRO)
Kasuality doesn't just generate visual color combinations; it provides a true engineering infrastructure for UI development. This mode transforms your "Seed" color into a ready-to-use Enterprise Design System.
- Semantic Roles: The engine automatically calculates the perfect shades for Primary Action, Surface Background, Borders, and Success/Error states.
- State Calculation (UX): Mathematical generation of Hover, Pressed, and Disabled variants by scientifically adjusting luminance and saturation in the OKLCH space.
- Enterprise Integration: The JSON export complies with the global standard format of the W3C Design Tokens Community Group (using
$valueand$typeprefixes). The infrastructure is natively compatible with Figma Tokens Studio and Style Dictionary.