Skip to main content
Glama

UI State Palette Generator

ui_states
Read-only

Generate WCAG-compliant UI state colors from a brand hex. Computes hover, active, disabled, and other states with contrast ratios and CSS custom properties for light and dark mode.

Instructions

Generate a complete WCAG-compliant UI state palette from a brand hex. Returns colours for: brand, hover, active, disabled, focus ring, success, warning, error, info, surface subtle, surface strong. All states computed for contrast against your background colour. Returns hex, contrast ratio, WCAG grade, and usage note for each state. Includes CSS custom properties ready to paste. Supports light and dark mode. Use before building any UI component system.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
brand_hexYesBrand colour hex e.g. '#D4A829'
background_hexNoBackground hex (default #FFFFFF)
dark_modeNoGenerate for dark mode (default false)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
resultNo
errorNo
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds significant behavioral context beyond the readOnlyHint annotation: it specifies that colors are computed for contrast against the background, returns hex, contrast ratio, WCAG grade, and usage notes, and supports light and dark modes. No contradictions with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise at 5 sentences, front-loaded with the main purpose. Every sentence adds value (list of outputs, contrast, WCAG, CSS, modes, usage guidance). No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (3 parameters, output schema exists), the description fully covers what the tool does, returns, and when to use it. It mentions output details and parameter defaults, making it self-contained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds minor context (e.g., 'contrast against your background colour' hints at background_hex), but does not significantly enhance understanding of parameters beyond the existing schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Generate') and states the resource ('complete WCAG-compliant UI state palette from a brand hex'). It lists all output colors and mentions WCAG compliance, contrast, and CSS custom properties. It distinguishes from siblings by positioning itself as a comprehensive foundation for UI component systems.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states 'Use before building any UI component system,' providing clear usage context. It does not explicitly mention when not to use or list alternatives, but the context of siblings (e.g., palette_generate, palette_light_dark) implies other tools exist for different palette tasks.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DigbyO/colour-memory-api'

If you have feedback or need assistance with the MCP directory API, please join our Discord server