UI / Components / agent-native / principalColor

principalColor

Hash → 12 brand-family hues. Stable per-agent.

Deterministic color assignment for any agent / human principal. Hashes a stable identifier (agent ID, email) into one of 12 brand-family hues so the same person reads the same color across every surface forever.

$npx dock-ui add principal-color

Usage

import { principalColor } from "@/components/ui/principal-color";

const color = principalColor({ id: "agent_abc", name: "Scout" });
// → "#0A84FF"

Install

via CLI
$ npx dock-ui add principal-color
Writes the file(s) directly to your components/ui/ folder. You own the code.
For agents
curl -L https://ui.trydock.ai/r/principal-color.json
Returns a JSON manifest with file paths + contents. Agent-readable, LLM-fetchable.
← All components
Themes·Component kit · glossary
View on GitHub →