paint-color-engine
v1.0.0
Published
Zero-dependency CIELAB & CIEDE2000 paint color matcher, LRV calculator, 9-family undertone classifier, CAT16 lighting compensator, and 507 curated Sherwin-Williams, Benjamin Moore & Behr swatches.
Maintainers
Readme
paint-color-engine
Zero-dependency TypeScript colorimetry & commercial paint color matching engine using CIELAB ($L^*a^b^$), CIEDE2000 ($\Delta E_{00}$) perceptual distance, Light Reflectance Value (LRV), Helmholtz-Kohlrausch perceived lightness, 9-family Killam undertone classification, CAT16 room lighting calibration, and 507 curated Sherwin-Williams, Benjamin Moore & Behr architectural swatches.
- HEX / RGB to Paint Brand Converter: paintcolormatcher.com/hex-to-paint-color
- Photo Wall Paint Color Identifier: paintcolormatcher.com/find-paint-color-from-photo
- Sherwin-Williams Swatch Catalog: paintcolormatcher.com/sherwin-williams-paint-colors
- Benjamin Moore Swatch Catalog: paintcolormatcher.com/benjamin-moore-paint-colors
- Behr Paint Swatch Catalog: paintcolormatcher.com/behr-paint-colors
- Offline Browser Matcher (GitHub Pages): abigaildavised.github.io/paint-color-engine
Installation
npm install paint-color-engineQuick Start
import {
parseColorInput,
findClosestPaintMatches,
estimatePaintGallons,
analyzeLrvRoomExposure,
} from 'paint-color-engine';
const parsed = parseColorInput('#D1CBC1');
console.log(parsed);
// { hex: '#D1CBC1', lrv: 60.3, lab: [81.99, 0.65, 5.01], undertone: 'Warm Yellow-Cream', ... }
const matches = findClosestPaintMatches('#D1CBC1', { brandSlug: 'all', limit: 5 });
console.log(matches[0]);
// Closest Sherwin-Williams / Benjamin Moore / Behr swatch with deltaE2000 & similarityPct
const gallons = estimatePaintGallons({
wallPerimeterFeet: 52,
ceilingHeightFeet: 9,
coats: 2,
doorsCount: 2,
windowsCount: 2,
});
console.log(gallons.recommendedGallons); // 3
console.log(analyzeLrvRoomExposure(60, 'north'));License
MIT — Maintained by Abigail Davis ([email protected]) for PaintColorMatcher.com.
