{
  "name": "color.convert",
  "group": "compute",
  "summary": "Convert a colour between hex, RGB, HSL and OKLCh, and check WCAG contrast.",
  "description": "Parses any CSS colour notation and re-emits it in every format including OKLCh. Supply `against` to get the WCAG 2.1 contrast ratio and pass/fail verdicts for normal and large text — the check that decides whether an interface is legible, computed rather than eyeballed.",
  "keywords": [
    "hex to rgb",
    "color converter",
    "wcag contrast",
    "accessibility",
    "oklch",
    "hsl",
    "contrast ratio"
  ],
  "endpoint": "https://fluentedi.com/v1/color/convert",
  "mcp_name": "color_convert",
  "makes_network_request": false,
  "parameters": {
    "type": "object",
    "properties": {
      "color": {
        "description": "Colour in hex, rgb(), hsl(), or a CSS name.",
        "type": "string",
        "maxLength": 100,
        "examples": [
          "#3b82f6"
        ]
      },
      "against": {
        "description": "Optional second colour to compute a WCAG contrast ratio against.",
        "type": "string",
        "default": "",
        "maxLength": 100,
        "examples": [
          "#ffffff"
        ]
      },
      "shades": {
        "description": "Also return a 50-950 lightness scale built from this hue.",
        "type": "boolean",
        "default": false
      }
    },
    "required": [
      "color"
    ],
    "additionalProperties": false
  },
  "examples": [
    {
      "description": "Every notation for one colour",
      "url": "https://fluentedi.com/v1/color/convert?color=%233b82f6",
      "args": {
        "color": "#3b82f6"
      }
    },
    {
      "description": "Is this text legible on white?",
      "url": "https://fluentedi.com/v1/color/convert?color=%23767676&against=%23ffffff",
      "args": {
        "color": "#767676",
        "against": "#ffffff"
      }
    },
    {
      "description": "Generate a palette scale",
      "url": "https://fluentedi.com/v1/color/convert?color=%233b82f6&shades=true",
      "args": {
        "color": "#3b82f6",
        "shades": true
      }
    }
  ],
  "suggestion": null
}