ML-powered brand primary detection
Overview
When a palette has four strong colors and two plausible brand primaries, the heuristic picks wrong. Add --ai and a trained model identifies the actual brand primary. One flag, experimental.
Dembrandt's heuristic primary detection scores colors by saturation, frequency, and contrast. It handles clean two-color palettes well and fails on complex ones where a utility color outscores the actual brand primary. The --ai flag runs inference on a trained ONNX logistic regression model bundled in the CLI (0.9 KB). The model was trained on real brand extractions and picks the brand primary from the full extracted palette, not from rules. It sets colors.semantic.primary to the predicted value and prints the confidence score. The optional runtime dependency keeps the default install lightweight: npm install onnxruntime-node once, then the flag is available. Without the flag, nothing changes.
Predict brand primary with ML
Install the optional runtime first
Combine with other flags
colors.semantic.primary set to the ML-predicted brand primary. Terminal prints the score and accuracy.
More in Extraction
Browse all
All recipes →
Continue reading
Getting started
Install Dembrandt and turn any public website into a complete set of design tokens in under 2 minutes. All you need is Node.js and a terminal.
MCP
Use Dembrandt as a tool inside Claude Code, Cursor, Windsurf, or any MCP-compatible editor. Your agent extracts live design tokens automatically when you ask.
Skills
30 UX and design system skills for AI agents. Install once, your agent designs with hierarchy, WCAG standards, and brand accuracy. The UX knowledge that normally costs senior consultant days.