Skip to content

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.

Capabilitycode.document_colors
AreaCode insight and refactoring
Accessreads only
Reaches—
Rightsnone
Dry runnone

Arguments

ArgumentTypeDescription
pathrequiredstringWorkspace-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.

Terminal window
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"
}
}
}