Perceptual color tools for Unity.
Design, compare, and validate color transitions using OKLab instead of RGB to avoid muddy gradients, hue drift, and accessibility issues in UI and theme systems.DAWG Tools - OKLab Color Inspector PRO - Perceptual Color Tools for UnityUnity’s default Color.Lerp interpolates colors in RGB component space.https://dawgtools.org/unity/For UI and theme transitions, this often results in:Desaturated or “dirty” midpointsPerceived brightness dipsUnintended hue shiftsInconsistent animation qualityThe OKLab color space is designed so that distance and interpolation better match human perception.This tool makes the difference visible, measurable, and actionable inside the Unity Editor.OKLab interpolation produces smoother, visually consistent gradients and transitions because it operates in a perceptual color space rather than raw RGB component space.Instead of guessing how a transition will look, you can:Compare Gamma RGB vs Linear RGB vs OKLab interpolationInspect perceptual midpointsMeasure ΔE distance between colorsValidate contrast compliance before shipping1. Typical WorkflowSelect two UI colors (e.g., Normal → Hover).Compare Unity RGB interpolation against OKLab interpolation.Inspect midpoint, hue drift, chroma, and contrast.Replace Color.Lerp with OKLabColor.Lerp in runtime code.2. Who It’s For:UI / UX engineersTechnical artistsTools programmersTeams implementing dynamic themesDevelopers who care about visual polish and accessibility3. WHAT'S INCLUDEDInterpolation ComparisonSide-by-side preview of:Unity RGB (Gamma)Linear RGBOKLab interpolationInstantly see how transitions differ visually and mathematically.Perceptual MetricsΔE (perceptual distance measurement)Live midpoint inspectionChroma comparisonOKLab component breakdown (L, a, b)Hue angle visualizationAccessibility & Contrast ToolsWCAG contrast ratio calculationAA / AAA / Large-text thresholdsAutomatic best-text color suggestionContrast validation against background colorsComputed correctly in linear luminance space.OKLab UtilitiesOKLabColor.Lerp runtime helperOKLab decomposition per colorCopy helpers (Hex, OKLab values)Lock Lightness (L)Optional perceptual constraints:Lock Chroma (C)Technical DetailsUnity 2021.3 LTS or newerBuilt-in, URP, and HDRP compatibleEditor-focused tool (no runtime dependencies required)Clean namespace: DawgTools.OKLabImplementation follows Björn Ottosson’s reference specificationContrast computed using correct linear RGB luminanceRuntime IntegrationAt runtime, simply replace:Color.Lerp(a, b, t);With:OKLabColor.Lerp(a, b, t);Use perceptual interpolation only where it matters — UI transitions, theme blending, animated color states.Designed ForUI animation systemsTheme enginesAccessibility-conscious projectsDesign-heavy applicationsProduction workflows requiring visual consistencyLicenseLicensed under the Unity Asset Store EULA.This asset was developed with AI-assisted tools used during development (code review, refactoring suggestions, and documentation drafting).All algorithms, architecture decisions, and final code were reviewed, validated, and are fully owned by the publisher.The asset does not require any AI services at runtime and contains no AI-generated media or external dependencies.



