Skip to content

Show inline previews for rgb hex color strings (LSP textDocument/documentColor) #4678

@probablykasper

Description

@probablykasper

Describe the feature

Show a color preview for languages like CSS and Tailwind.

VSCode has this, which it calls "color decorators":

image

JetBrains editors, such as PyCharm, take it one step further and provide a color wheel + picker that can be opened by clicking on the color preview. This allows you to change the color in a more human friendly way, while having the changes reflected in the source code in the original format.

I use a color highlight extension which enables different styles:
imageimageimage
imageimage

LSP can provide this via textDocument/documentColor.

Metadata

Metadata

Labels

cssCSS styling supporteditorFeedback for code editing, formatting, editor iterations, etc

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions