Since KDE SC 4.12 kate has a Python plugin which can help to edit colors in various files like CSS, kate syntax, HTML, QML… First of all, one ought to enable that plugin in the Python plugins manager dialog.

Color Tools

The plugin provides a Palette tool-view which contains all colors found in the current document. For example here is the palette for http://cdn.kde.org/css/bootstrap.css:

CSS file from dot.kde.org

When a text with some #hex color gets selected, a tooltip with that color will appear. Clicking on a color cell in the tool-view moves a cursor to the location, where that color has defined. This plugin add a new action to the context menu of a document:

Insert color action

This action show a “completion” popup with a color-chooser widget containing all used colors, so it is easy to choose some, using a keyboard or mouse.

Color insert completion popup

Note

Screenshots 1 and 3 are made of KDE SC 4.13

TODO

  • Support for other color syntaxes like rgb(R,G,B), rgba(R,G,B,A), hsl(...), & etc.


blog comments powered by Disqus