---
title: "Convert any color into all standard color spaces"
method: POST
path: "/color-convert.php"
tags: ["data"]
---

# Convert any color into all standard color spaces

`POST /color-convert.php`

## Request

- Base URL: `https://mate.tools/api/v1`
- URL: `https://mate.tools/api/v1/color-convert.php`
- Auth: none declared

Accepts hex (#ff5733 / ff5733 / #f53), rgb()/rgba()/hsl()/hsla() and ~148 CSS named colors. Returns the color in hex, rgb, rgba, hsl, hsv, cmyk and named, plus WCAG relative luminance and contrast ratios vs. white and black with AA/AAA flags.

## Request body

- object
  - `color` string, required

## Response `200`

Success

## Other responses

- `400`: Malformed request
- `429`: Rate limit exceeded (60/min, 600/hour per IP). Includes Retry-After header.

---

[API](https://skmtc.dev/mate/apis/mate-tools-api.md) · [All operations](https://skmtc.dev/mate/apis/mate-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mate/apis/mate-tools-api/revisions/874670b78962?raw)
