Skip to main content
Glama

color

Read-only

Convert colors between hex, RGB, HSL, HSV, OKLCH, and CSS names, check WCAG contrast against a background, and generate palette shades or harmony sets.

Instructions

Color in all notations (hex rgb hsl hsv oklch oklab, CSS name), WCAG contrast vs against + closest passing color, palette shades/harmony.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "color": "<color>"
    },
    "name": "color"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorYes
againstNo
paletteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds useful behavioral detail beyond that: it computes a 'closest passing color' alongside the contrast ratio and supports two palette modes, but it says nothing about output shape, whether contrast requires both colors, or any limits on the palette size.

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

Conciseness4/5

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

A single dense sentence that front-loads the main capability and wastes no words. It is telegraphic to the point of awkwardness ('contrast vs against'), but every clause maps to a real feature.

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

Completeness3/5

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

For a three-parameter utility with no output schema, the description covers what is computed but not what is returned (ratio format, palette size, closest-passing-color representation). It is adequate to invoke the tool, not fully sufficient to predict its output.

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

Parameters4/5

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

Schema coverage is 0%, so the description must carry the load, and it largely does: it enumerates the accepted notations for the 'color' input, identifies 'against' as the comparison color for WCAG contrast, and restates the palette modes (shades/harmony). It does not clarify whether 'against' accepts the same notation set or that it is optional, leaving a small gap.

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

Purpose4/5

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

The description names the resource (color) and enumerates concrete capabilities: notation parsing (hex/rgb/hsl/hsv/oklch/oklab/CSS name), WCAG contrast against a reference color with the closest passing color, and palette generation (shades/harmony). That is enough to distinguish it from siblings like convert_units or calc, though the leading phrase 'Color in all notations' is a noun fragment rather than an explicit verb.

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

Usage Guidelines3/5

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

Usage is only implied by the listed capabilities: an agent can infer it should call this for color conversion, contrast checking, or palette building. There is no explicit when-to-use or when-not statement, and no alternative tool is named or excluded.

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