Skip to content

Live Drift Report

This interactive demo shows how TailTrace translates CSS values to Tailwind tokens using the same @tailtrace/core engine that powers all our tools.

Total
8
Exact
3
Fuzzy
4
None
1
PropertyOriginalTokenConfidence
color#0f172atext-slate-900~ Fuzzy
background-color#3b83f6bg-blue-500~ Fuzzy
border-color#e11d48✗ None
padding15pxp-3.5~ Fuzzy
margin-bottom24pxmb-6✓ Exact
gap12pxgap-3✓ Exact
border-radius8pxrounded-lg✓ Exact
font-size14.5pxtext-sm~ Fuzzy
Processed in 0.34ms
LevelMeaningWhen it happens
ExactPerfect token matchValue matches a token exactly
FuzzyClose match within thresholdColor ΔE < threshold, spacing within 2px
NoneNo matching tokenValue too far from any token

Delta-E (ΔE) is a metric for perceptual color difference. TailTrace uses CIEDE2000, the most accurate algorithm:

ΔE ValuePerception
0Identical
1.0Not noticeable
2.3Just noticeable difference (JND)
5.0Clearly different
10+Very different

The default threshold of 2.3 catches colors that humans can barely perceive as different - perfect for design system compliance.

ColorHexExpected Match
Exact blue-500#3b82f6Exact match
Off by 1#3b83f6Fuzzy (ΔE ~0.7)
Different blue#2563ebExact match to blue-600
Custom color#ff6b6bFuzzy match to red-400

This demo uses @tailtrace/core directly:

import { TranslationEngine } from '@tailtrace/core';
const engine = new TranslationEngine({
deltaEThreshold: 2.3,
});
const results = engine.translate({
'background-color': '#3b83f6',
'padding': '15px',
});
console.log(results.styles);
// [
// { property: 'background-color', confidence: 'fuzzy', tailwindClass: 'bg-blue-500', deviation: 0.73 },
// { property: 'padding', confidence: 'fuzzy', tailwindClass: 'p-4', deviation: 1 },
// ]

Install the core package:

Terminal window
bun add @tailtrace/core

Then import and use:

import { TranslationEngine, ColorMatcher, parseColor, deltaE2000 } from '@tailtrace/core';