Inverts any color by flipping RGB values to their opposites (255 minus each component). Use via MCP in Cursor or Windsurf, or call GET /v1/color/invert with hex, RGB, or HSL input. Perfect for creating contrasting themes or accessibility features. Returns the inverted color in multiple formats including hex and RGB values.
curl "https://tinyfn.io/v1/color/invert" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/color/invert', {
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/invert',
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"
}
}
}
}
Pass the hex value to the endpoint and get the mathematical inverse where each RGB component becomes 255 minus its original value. #FF5733 becomes #00A8CC.
Yes, MCP integration lets AI agents parse your CSS colors and generate inverted values for dark mode themes or contrast adjustments directly in your code.
Inversion flips RGB values mathematically (255-R, 255-G, 255-B) while complementary colors use color theory relationships on the color wheel.
The tool inverts RGB components only. Alpha transparency values remain unchanged in the output.
Accepts hex (#RRGGBB), RGB (rgb(r,g,b)), and HSL (hsl(h,s,l)) formats. Returns inverted results in multiple standard formats.
Get your free API key and start using Invert Color in seconds.
Get Free API Key