Release history
See what changed, what remains experimental, and the known boundaries of each release.
Read changelog ↗Development release · 0.1.0
Compile a locked brand color into semantic roles, pair-specific accessibility evidence, provenance, versioned JSON, and CSS—without a network request or model dependency.
Install
Color has not yet been published to a package registry. Clone the repository to use or contribute to the TypeScript workspace.
git clone https://github.com/TejSolPro/color.git
cd color
pnpm install
pnpm typecheck
pnpm test
pnpm buildPublic API stability begins at 1.0.0. Until then, pin the commit or release you evaluate.
Theme API
compileOneBrandTheme() accepts a required hexadecimal brand color and an optional canvas. The default canvas is #f3efe7.
import {
compileOneBrandTheme,
exportThemeCss,
} from "@tejsolpro/color";
const theme = compileOneBrandTheme({
brand: "#9d3f2d",
canvas: "#f3efe7",
});
console.log(theme.schemaVersion); // "0.1.0"
console.log(theme.algorithm); // "srgb-v0.1"
console.log(theme.tokens.primary); // "#9d3f2d"
console.log(theme.allRequiredPairsPass); // true
console.log(exportThemeCss(theme));The result contains eleven semantic tokens, nine intended-pair audits, and provenance for every token. The supplied brand and canvas remain locked.
CLI
# Versioned JSON with tokens, evidence, and provenance
solpro-color theme "#9d3f2d" --canvas "#f3efe7"
# CSS custom properties
solpro-color theme "#9d3f2d" --format css
# Audit one exact foreground/background pair
solpro-color contrast "#171512" "#f3efe7"The CLI is non-interactive and writes results to standard output, which makes it suitable for coding agents, scripts, and CI pipelines.
Contrast API
import { contrastRatio, auditPair } from "@tejsolpro/color";
const ratio = contrastRatio("#171512", "#f3efe7");
const result = auditPair("#171512", "#f3efe7");
// result.normalText, result.largeText, result.nonTextDisplayed ratios are truncated to two decimals, never rounded up, so a failing pair cannot appear to meet its threshold.
MCP
The developer-preview plugin exposes the same compiler through two read-only MCP tools. It does not duplicate or replace the core engine.
pnpm --filter @tejsolpro/color-mcp dev
# Connect http://localhost:8787/mcp as a custom MCP serverSee what changed, what remains experimental, and the known boundaries of each release.
Read changelog ↗Understand the boundary between deterministic core logic and delivery adapters.
Read architecture ↗Review what the plugin processes, what it does not collect, and how to contact us.
Read privacy policy →