Calculate complementary colors (opposite on the color wheel) for any hex, RGB, or HSL input. Access via MCP in Cursor, Windsurf, or other AI editors at GET /v1/color/complement. Returns the exact opposite hue while preserving saturation and lightness. Perfect for generating contrast pairs in design workflows.
curl "https://tinyfn.io/v1/color/complement" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/color/complement', {
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/complement',
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"
}
}
}
}
Accepts hex (#FF0000), RGB (255,0,0), and HSL (0,100%,50%) formats. Always returns the complementary color in the same format as the input.
Call the color/complement tool with your base color. The AI agent gets the exact complementary color instantly instead of guessing, ensuring accurate color theory calculations.
Complementary colors sit 180° opposite on the color wheel (red/green), while analogous colors are adjacent (red/orange/yellow). This tool only calculates true complements.
No, the tool focuses on pure color relationships. Alpha/transparency values are ignored, and the complement is calculated based on the base RGB values only.
This tool returns only the direct complement (180° opposite). For triadic (120° apart) or split-complementary schemes, you'd need separate color harmony tools.
Get your free API key and start using Complement Color in seconds.
Get Free API Key