Converts hex color codes to HSV (Hue, Saturation, Value) format with precise mathematical accuracy. Access via MCP in Cursor or Windsurf for AI-assisted color workflows, or REST at `/v1/color/hex-to-hsv`. Example: `#FF5733` returns `{h: 14, s: 80, v: 100}`. Perfect for design systems and color manipulation tasks.
curl "https://tinyfn.io/v1/color/hex-to-hsv" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/color/hex-to-hsv', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/color/hex-to-hsv',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's color tools:
{
"mcpServers": {
"tinyfn-color": {
"url": "https://tinyfn.io/mcp/color",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Returns an object with `h` (hue 0-360°), `s` (saturation 0-100%), and `v` (value/brightness 0-100%). All values are rounded to integers for practical use.
Call the tool with any valid hex color code. Works with 3-digit (#RGB), 6-digit (#RRGGBB), and both with/without the hash prefix.
Yes, it validates input and returns clear error messages for malformed hex codes. Only accepts valid hex color formats.
HSV uses Value (brightness) while HSL uses Lightness. HSV is preferred for color pickers and design tools because it matches human color perception better.
This endpoint processes one color per request. For batch conversions, make multiple API calls or use it iteratively in your MCP-enabled AI workflow.