document_colors
MCP tools › Code insight and refactoring
The colours in a CSS, SCSS, Less or HTML file, as the editor's gutter swatches show them: hex, rgb(), hsl() and named colours in values, variables, <style> blocks and style attributes (never selectors, comments, strings or url(…)). Returns known (false for other languages) and colors with 0-based line, char start/end, text and hex. Open files are read as the editor shows them. Read only.
Its results carry text from files, language_server: the client is told to treat that as data, never as instructions.
| Capability | code.document_colors |
|---|---|
| Area | Code insight and refactoring |
| Access | reads only |
| Reaches | — |
| Rights | none |
| Dry run | none |
Arguments
| Argument | Type | Description |
|---|---|---|
pathrequired | string | Workspace-relative file path. |
Call it from a shell
ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.
ferris-idea call ~/my-project document_colors '{"path":"<string>"}'Input schema as JSON
{ "type": "object", "required": [ "path" ], "properties": { "path": { "description": "Workspace-relative file path.", "type": "string" } }}