convert_color

Pack: colorapi · Endpoint: https://gateway.pipeworx.io/colorapi/mcp

Convert between color formats: RGB to hex, HSL, HSV, CMYK. Returns the closest named color for the input values.

Parameters

NameTypeRequiredDescription
rnumberyesRed channel (0-255).
gnumberyesGreen channel (0-255).
bnumberyesBlue channel (0-255).

Example call

Arguments

{
  "r": 255,
  "g": 87,
  "b": 51
}

curl

curl -X POST https://gateway.pipeworx.io/colorapi/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"convert_color","arguments":{"r":255,"g":87,"b":51}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('convert_color', {
  "r": 255,
  "g": 87,
  "b": 51
});

More examples

{
  "r": 52,
  "g": 152,
  "b": 219
}

Response shape

Always returns: name, exact_name_match, closest_named_hex, hex, rgb, hsl, hsv, cmyk, contrast

FieldTypeDescription
namestringCommon color name
exact_name_matchbooleanWhether the name is an exact match
closest_named_hexstringHex code of closest named color
hexstringHex color value
rgbstringRGB color format string
hslstringHSL color format string
hsvstringHSV color format string
cmykstringCMYK color format string
contraststringWCAG contrast ratio value
Full JSON Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Common color name"
    },
    "exact_name_match": {
      "type": "boolean",
      "description": "Whether the name is an exact match"
    },
    "closest_named_hex": {
      "type": "string",
      "description": "Hex code of closest named color"
    },
    "hex": {
      "type": "string",
      "description": "Hex color value"
    },
    "rgb": {
      "type": "string",
      "description": "RGB color format string"
    },
    "hsl": {
      "type": "string",
      "description": "HSL color format string"
    },
    "hsv": {
      "type": "string",
      "description": "HSV color format string"
    },
    "cmyk": {
      "type": "string",
      "description": "CMYK color format string"
    },
    "contrast": {
      "type": "string",
      "description": "WCAG contrast ratio value"
    }
  },
  "required": [
    "name",
    "exact_name_match",
    "closest_named_hex",
    "hex",
    "rgb",
    "hsl",
    "hsv",
    "cmyk",
    "contrast"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "colorapi": {
      "url": "https://gateway.pipeworx.io/colorapi/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026