Skip to main content
Glama

Convertir formatos de color

color-convert
Read-onlyIdempotent

Convierte colores CSS (hex, rgb, hsl, hwb, oklch, oklab, nombres) a hex, RGB, HSL, HSV, CMYK, OKLab, OKLCH y CIELAB. Cuándo: hay que calcular con exactitud colores, contrastes o paletas, p. ej. para revisar accesibilidad. No para: generar paletas armónicas desde un color base (color-palette). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Parses any common CSS color (hex 3/4/6/8, rgb(), hsl(), hwb(), oklch(), oklab(), 148 named colors) and returns hex, RGB, HSL, HSV, CMYK (naive), OKLab, OKLCH and CIELAB (D65). Out-of-gamut OKLCH is chroma-reduced into sRGB. When: color values, contrast or palettes have to be computed exactly, e.g. for accessibility checks. Not for: generating harmony palettes from a base color by rotating OKLCH hue (color-palette). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
colorYesCSS color: hex, rgb(), hsl(), hwb(), oklch(), oklab() or a named color (string; required; up to 100 chars).

Output Schema

NameRequiredDescriptionDefault
hexNo
hslNo
hsvNo
labNo
rgbNo
cmykNo
alphaNo
oklabNo
oklchNo
css_hslNo
css_rgbNo
css_oklchNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / color / examples
      Added value: +[
      +  "#ff8800"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Parses any common CSS color (hex 3/4/6/8, rgb(), hsl(), hwb(), oklch(), oklab(), 148 named colors) and returns hex, RGB, HSL, HSV, CMYK (naive), OKLab, OKLCH and CIELAB (D65). Out-of-gamut OKLCH is chroma-reduced into sRGB. When: color values, contrast or palettes have to be computed exactly, e.g. for accessibility checks. Not for: generating harmony palettes from a base color by rotating OKLCH hue (color-palette). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Adds real behavior beyond the annotations: out-of-gamut OKLCH is chroma-reduced into sRGB, CMYK is naive, output is D65-referenced, plus determinism and hard limits (64 KB input, 1 s per call, 1 MB result). Some of this restates the annotations (read-only, no network, no stored state), and the trailing pointer '[EN completo / full EN: inputSchema.description]' is meta-noise rather than disclosure.

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

Conciseness3/5

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

Well front-loaded and labeled (Cuándo / No para / Efectos secundarios / Determinista / Límites), but the entire content is delivered twice in Spanish and English, roughly doubling the token cost for a single agent with no gain. The trailing 'full EN' pointer is dead weight.

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?

An output schema exists, so return values need no prose, yet the description still names the output color spaces. With one required parameter, full schema coverage, and explicit limits and gamut behavior, an agent has everything needed to call this correctly on the first try.

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 100% and the schema already lists accepted formats, but the description adds specifics the schema omits — hex 3/4/6/8 variants, 148 named colors, hwb/oklch/oklab — so an agent knows the accepted grammar without opening the schema. It does not mention the 100-char cap, though the schema does.

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?

States a specific verb and resource ('Convierte colores CSS') and enumerates both the accepted input formats (hex 3/4/6/8, rgb(), hsl(), hwb(), oklch(), oklab(), 148 named colors) and the full output set (hex, RGB, HSL, HSV, CMYK, OKLab, OKLCH, CIELAB). It also explicitly distinguishes itself from the nearest sibling, color-palette.

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

Usage Guidelines5/5

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

Explicit 'Cuándo' clause gives concrete use cases (exact color/contrast/palette math, accessibility checks) and a 'No para' clause names the alternative tool (color-palette) plus the condition that selects it (harmony palettes by rotating OKLCH hue). Nothing is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources