Colors-LE Logo

Colors-LE: Zero Hassle Color Extraction

Pull every color out of the current file in one keystroke
CSS, SCSS, LESS, Stylus, HTML, JavaScript, TypeScript, SVG, XML, JSON, YAML, TOML, Markdown, and any text

Install from VS Code Marketplace Open VSX downloads colors-le-mcp on npm colors-le on npm colors-le on crates.io LE Tools

---

Colors-LE in VS Code

> **Useful?** A star or rating is how other developers find it — > [★ GitHub](https://github.com/nolindnaidoo/colors-le) · > [★ Open VSX](https://open-vsx.org/extension/nolindnaidoo/colors-le/reviews) · > [★ Marketplace](https://marketplace.visualstudio.com/items?itemName=nolindnaidoo.colors-le&ssr=false#review-details) ## What it does Open a file, run `Colors-LE: Extract Colors`, and every color in the document lands in a new editor — deduplicate, sort, convert, filter, analyze, or validate it from there. Works in VS Code and in VS Code–based editors like Cursor and VSCodium (installable from Open VSX). - **Palette auditing** — every hex, rgb()/rgba(), hsl()/hsla(), hwb(), lab()/lch(), oklab()/oklch(), color(), and named color in stylesheets, markup, and code - **Design-system review** — analyze distribution, cluster similar colors, spot near-duplicates - **Accessibility checks** — contrast ratios against WCAG AA/AAA via the Validate command ## Install | Where | What you get | Install | |---|---|---| | **VS Code** | Extraction, conversion, analysis and validation in your editor | [Marketplace](https://marketplace.visualstudio.com/items?itemName=nolindnaidoo.colors-le) | | **Cursor, VSCodium, Windsurf** | The same extension | [Open VSX](https://open-vsx.org/extension/nolindnaidoo/colors-le) | | **A terminal or a CI step** | The same extraction over a whole tree, with exit codes | `npx colors-le` · [npm](https://www.npmjs.com/package/colors-le) or `cargo install colors-le` · [crates.io](https://crates.io/crates/colors-le) | | **Any MCP agent, via Node** | `extract_colors` over stdio | `npx colors-le-mcp` · [npm](https://www.npmjs.com/package/colors-le-mcp) | ## Use it from an AI agent The same engine runs as an [MCP](https://modelcontextprotocol.io) server, so an agent can call it directly instead of you running a command. | Editor | How | |---|---| | **VS Code** 1.101+ | Nothing to install — the extension registers `extract_colors` with agent mode | | **Claude Code** | `claude mcp add colors-le -- npx -y colors-le-mcp` | | **Cursor, Windsurf, anything else** | point it at `npx colors-le-mcp` |

An agent in Claude Code calling the colors-le MCP server

``` extract_colors(content, format?, filename?, dedupe?, maxResults?) ``` Returns every color with its notation and 1-based line and column, capped at 500 by default with `meta.truncated` so a large stylesheet cannot flood the agent's context window. The server takes content and returns data — it reads no files and makes no network requests of its own. Published as [`colors-le-mcp`](https://www.npmjs.com/package/colors-le-mcp) on npm and as `io.github.nolindnaidoo/colors-le` in the [MCP registry](https://registry.modelcontextprotocol.io).
Configuring it by hand — any host with an MCP config file Most hosts read a JSON config. Add one entry: ```json { "mcpServers": { "colors-le": { "command": "npx", "args": ["-y", "colors-le-mcp"] } } } ``` `-y` skips the install prompt on first run. Pin a version if you would rather not track releases — `colors-le-mcp@2.5.0`. Prefer not to go through `npx` on every launch? Install it once and point at the binary instead: ```bash npm install -g colors-le-mcp ``` ```json { "mcpServers": { "colors-le": { "command": "colors-le-mcp" } } } ``` It speaks MCP over stdio and needs no environment variables, no API key and no configuration of its own. To check it before wiring it into anything: ```bash echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | npx -y colors-le-mcp ``` That prints the tool list and exits — if you see `extract_colors`, the server works.
## Supported formats | Format | Language IDs | Where colors are recognized | |---|---|---| | CSS | `css` | Hex/functional literals anywhere outside comments; named colors in declaration values | | SCSS / LESS / Stylus | `scss`, `less`, `stylus` | Same as CSS, plus `//` line comments respected; Stylus `=` assignments count as values | | HTML | `html` | `style="…"` attributes, `