Color adjust lightness

color-adjust-lightness · version 1.0.0 · Geometry, location & color · free, no key needed

Lightens or darkens a CSS color by percentage points of HSL lightness and returns a hex color.

Use when you need to: lighten a hex color by 20 percent · darken a CSS color by 10 percent · increase HSL lightness.

Decide before calling

Read the versioned contract and the supported scope below. Reuse color-adjust-lightness@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use color-adjust-lightness@1.0.0 for lighten a hex color by 20 percent. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "color": "#336699",
  "percentage": 20
}

Response:

{
  "result": {
    "standard_version": "CSS Color 4 (2024-02-14); WCAG 2.2",
    "format": "hex",
    "value": "#6699cc"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "color-adjust-lightness",
  "version": "1.0.0",
  "input": {
    "color": "#336699",
    "percentage": 20
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/color-adjust-lightness/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"color":"#336699","percentage":20}'

The machine-readable contract is at /v1/tools/color-adjust-lightness/versions/1.0.0.

CLI

node cli.mjs run color-adjust-lightness 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.