Color Utilities

Desaturate Color

Reduces color saturation by a specified percentage, making colors appear more muted or grayscale. Works with hex, RGB, HSL, and other standard color formats via GET /v1/color/desaturate. Perfect for creating subtle color variations in design workflows. MCP integration lets AI agents in Cursor and Windsurf programmatically adjust color palettes without approximation.

API Endpoint

GET /v1/color/desaturate

Code Examples

curl "https://tinyfn.io/v1/color/desaturate" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/color/desaturate', {
  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/desaturate',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

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"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

What color formats does desaturate accept?

Accepts hex (#FF5733), RGB (255,87,51), HSL (9,100%,60%), and other standard web color formats. Returns the same format as input.

How do I desaturate a color by 50% using MCP?

Call the desaturate tool with your color value and percentage=50. For #FF5733 at 50% desaturation, you'd get a more muted orange tone.

What happens if I desaturate by 100%?

100% desaturation removes all color, converting to grayscale. The result maintains the same brightness but becomes a shade of gray.

Can I use negative percentages to increase saturation?

No, this tool only decreases saturation. Use the separate saturate tool to increase color intensity or vibrancy.

How does desaturation work with already gray colors?

Gray colors (saturation already at 0%) remain unchanged regardless of the desaturation percentage applied.

Try Desaturate Color Now

Get your free API key and start using Desaturate Color in seconds.

Get Free API Key