# colors-le [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/nolindnaidoo/colors-le  
**GitHub Stars:** 1  
**npm Downloads (last month):** 1352  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/colors-le

## Description
Extract colors from stylesheets and code, with their notation and position.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "colors-le": {
    "command": "npx",
    "args": ["-y","colors-le-mcp"]
  }
}
```

## Documentation

## What the colors-le MCP server does

The colors-le MCP server exposes color extraction to MCP-compatible agents through the `extract_colors` tool. It accepts document content directly rather than opening files, then identifies color literals and returns their normalized color, original notation, and 1-based line and column position. Results can be deduplicated and limited; the default cap is 500 entries, with `meta.truncated` indicating that more matches were available.

Supported inputs include CSS, SCSS, LESS, Stylus, HTML, JavaScript, TypeScript, SVG/XML, JSON, JSONC, YAML, TOML, Markdown, and plain text. Files in other language modes are treated as raw text and identified as `unknown` in the metadata. The parser ignores colors in comments and supports hexadecimal forms, functional RGB and HSL syntax, CSS Color 4 functions, named colors, and several SVG or markup attributes.

## How it works

Send source text to `extract_colors` with optional `format` and `filename` values. The format helps select language-aware parsing rules, while the filename can provide context in the response. Optional `dedupe` behavior reduces repeated values, and `maxResults` controls the returned result count.

The server performs content-in, data-out processing. It does not read files and does not make network requests. This makes it suitable for agents that already have file contents from an editor, repository tool, or another workflow.

## Setup and configuration

Run the colors-le MCP server with Node and `npx`:

```json
{
  "mcpServers": {
    "colors-le": {
      "command": "npx",
      "args": ["-y", "colors-le-mcp"]
    }
  }
}
```

The package is published as `colors-le-mcp`. Hosts that support MCP over stdio can launch it with `npx -y colors-le-mcp`; alternatively, install it globally with `npm install -g colors-le-mcp` and use the `colors-le-mcp` executable. Pin a package version when a fixed release is preferred. No environment variables, API key, or server-specific configuration are required.

Claude Code can register it with `claude mcp add colors-le -- npx -y colors-le-mcp`. VS Code 1.101 and later can obtain the tool through the Colors-LE extension's agent mode, while Cursor and Windsurf can be pointed at the stdio command.

## Tools and capabilities

The colors-le MCP server provides one documented tool:

- `extract_colors(content, format?, filename?, dedupe?, maxResults?)` — finds colors and returns their spellings, normalized values, positions, and truncation metadata when applicable.

Recognized color syntax includes short and full hex values, comma-based and modern space-separated `rgb()` and `hsl()` forms, `hwb()`, `lab()`, `lch()`, `oklab()`, `oklch()`, `color()`, and CSS named colors such as `rebeccapurple` and `transparent`. HTML and SVG parsing also covers relevant style and color attributes.

## Limitations and notes

Relative color syntax, `calc()`, and `var()` inside color functions are not parsed. Colors outside sRGB are clipped during conversion. Hex strings inside JavaScript strings, including URL fragments, can be detected. Stylus named colors require a value introduced with `:` or `=`. In raw-text scanning, a value segment extends to the end of its line, which can affect multiple tokens on one line. Alpha variants remain distinct colors rather than being merged with their opaque equivalents.

_Full upstream README: https://allmcps.com/mcp/colors-le/readme_

