HEX to RGB Converter
Convert HEX color codes to RGB values quickly and accurately for web design and digital projects.
Paste a HEX color, drag the RGB or HSL sliders, or use the visual picker to convert any color between HEX, RGB, HSL, and CMYK formats in real time.
HEX
RGB
HSL
CMYK
What is a color converter?
A color converter translates a single color between the formats used across the web, design, and print. The same shade of blue can be written as #4F8AB2, rgb(79, 138, 178), hsl(207, 38%, 50%), or cmyk(56%, 22%, 0%, 30%) - different formats serve different tools, but they all describe the same color.
Color format reference
- HEX - A 6-character hex code used in CSS and design tools, like #4F8AB2.
- RGB - Red, Green, Blue components from 0 to 255 - used by CSS and most APIs.
- HSL - Hue (0-360), Saturation (%) and Lightness (%) - easier to reason about visually.
- CMYK - Cyan, Magenta, Yellow, Key - the four-channel format used for print.
Use this tool from your AI agent
Free JSON API and Model Context Protocol (MCP) server. No signup, no API key, CORS open. Designed for Claude, ChatGPT, Cursor, scripts and frontend apps.
curl -X POST https://mate.tools/api/v1/color-convert.php \
-H "Content-Type: application/json" \
-d '{"color":"#FF5733"}' import urllib.request, json
req = urllib.request.Request(
"https://mate.tools/api/v1/color-convert.php",
data=json.dumps({"color":"#FF5733"}).encode(),
headers={"Content-Type": "application/json"},
)
with urllib.request.urlopen(req) as r:
print(json.load(r)) const r = await fetch("https://mate.tools/api/v1/color-convert.php", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({"color":"#FF5733"}),
});
console.log(await r.json()); Add to claude_desktop_config.json (Claude Desktop), ~/.cursor/mcp.json (Cursor), or any other MCP-compatible client:
{
"mcpServers": {
"mate-tools": {
"command": "npx",
"args": ["-y", "@mate-tools/mcp-server"]
}
}
}