"Convert #3498db to RGB" — your design agent says rgb(52, 152, 219). That's correct this time, but it won't be every time. Color conversion involves precise math with hex parsing, channel calculations, and color space transforms. These tools nail it consistently.
All Color Tools (26)
Your agent gets access to 26 color tools via the /mcp/color/ endpoint. Here's the complete list:
| Tool | Description |
|---|---|
color/hex-to-hsl | Hex To Hsl |
color/hsl-to-hex | Hsl To Hex |
color/hex-to-hsv | Hex To Hsv |
color/hsv-to-hex | Hsv To Hex |
color/hex-to-cmyk | Hex To Cmyk |
color/cmyk-to-hex | Cmyk To Hex |
color/lighten | Lighten Color |
color/darken | Darken Color |
color/saturate | Saturate Color |
color/desaturate | Desaturate Color |
color/grayscale | Grayscale Color |
color/invert | Invert Color |
color/complement | Complement Color |
color/triadic | Triadic Colors |
color/analogous | Analogous Colors |
color/split-complementary | Split Complementary Colors |
color/tetradic | Tetradic Colors |
color/contrast-ratio | Contrast Ratio |
color/luminance | Get Luminance |
color/blend | Blend Colors |
color/gradient | Generate Gradient |
color/shade | Generate Shades |
color/tint | Generate Tints |
color/random | Random Color |
color/is-valid-hex | Is Valid Hex |
color/name-to-hex | Name To Hex |
Agent Scenarios
Here's how real agents use these tools:
1. Design system agent
A UI agent converts brand colors between HEX, RGB, and HSL for different style contexts.
color/hex-to-rgb
{ "hex": "#3498db" }
2. Accessibility checker agent
A QA agent calculates contrast ratios between text and background colors for WCAG compliance.
color/contrast-ratio
{ "color1": "#333333", "color2": "#ffffff" }
3. Theme generation agent
A design agent generates complementary color palettes from a base brand color.
color/palette
{ "hex": "#3498db", "type": "complementary" }
MCP Setup
Add color tools to your agent in under 2 minutes. Choose your client:
Claude Desktop / Claude Code
Add this to your MCP config:
{
"mcpServers": {
"tinyfn-color": {
"url": "https://api.tinyfn.io/mcp/color/",
"headers": {
"X-API-Key": "your-api-key"
}
}
}
}
Cursor
Go to Settings > MCP and add a new server:
- Type: SSE
- URL:
https://api.tinyfn.io/mcp/color/sse - Headers:
X-API-Key: your-api-key
Tip: Use the category-specific endpoint (/mcp/color/) for the best experience. The all-in-one endpoint (/mcp/all/) works too but has 500+ tools which some clients handle less efficiently.
When to Use These Tools
Use color MCP tools when your agent needs to:
- Guarantee correctness — when wrong answers have real consequences
- Process user data — when you're operating on actual user input, not hypothetical examples
- Maintain consistency — when the same input must always produce the same output
You don't need these tools for casual conversation or rough estimates. Use them when precision matters.
Ready to add color tools to your agent?
Get Free API Key 100 requests/month free. No credit card required.Frequently Asked Questions
Why do LLMs get color conversions wrong?
Color conversions involve hexadecimal parsing and channel-specific math. LLMs approximate these calculations and can produce colors that are close but not exact, which matters for design consistency.
What color formats does TinyFn support?
TinyFn converts between HEX, RGB, HSL, and provides tools for contrast ratio calculation, color lightening/darkening, palette generation, and color analysis.
Can TinyFn check WCAG contrast compliance?
Yes. The contrast ratio tool calculates the ratio between two colors and indicates whether it meets WCAG AA and AAA standards for both normal and large text.