Color Utilities

Lighten Color

Brightens any color by a specified percentage using mathematical color space calculations. Use via MCP in Cursor or Windsurf, or call GET /v1/color/lighten with color and percentage parameters. Example: lighten #3366cc by 20% returns #5c85d6. Works with hex, RGB, HSL, and named colors for precise UI design workflows.

API Endpoint

GET /v1/color/lighten

Code Examples

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

How do I lighten a hex color by 30% using MCP?

Call the lighten_color tool with your hex value and percentage. The MCP tool handles the conversion automatically and returns the lightened hex code.

What color formats does the lighten function accept?

Accepts hex (#ff0000), RGB (rgb(255,0,0)), HSL (hsl(0,100%,50%)), and CSS named colors (red, blue, etc). Always returns the same format as input.

What happens if I try to lighten white or very light colors?

White (#ffffff) cannot be lightened further and returns unchanged. Very light colors may show minimal visual change as they approach the RGB ceiling values.

Is color lightening the same as adjusting opacity or alpha?

No, lightening modifies the actual RGB values to create brighter colors. Opacity/alpha changes transparency while keeping the base color unchanged.

Can AI agents use this for generating color palettes?

Yes, agents can chain multiple lighten calls with different percentages to create stepped color variations, perfect for generating UI themes or design systems.

Try Lighten Color Now

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

Get Free API Key