This plugin shows a color codes preview in an editor's sidebar.
Uncheck/Check View > Show Colors
- Hex color code (e.g.
#fff
#000000
) - Css rgb/rgba values (e.g.
rgb(0, 0, 0)
,rgb(50%, 0%, 100%)
,rgba(255,255,255, 0.8)
) - Css hsl/hsla values (e.g.
hsl(0, 100%, 50%)
,hsla(120, 100%, 50%, 0.5)
) - Named colors (e.g.
red
,blue
) - Java Color class colors (e.g.
Color.black
,new Color(100, 100, 100)
,new Color(0, 0, 255, 255)
)
- Show top two colors in a sidebar if there are multiple colors in a line.
- If you want to check all colors, please click a specific rectangle. They will be shown as a list.
- Click a colored rectangle
- Click a color value of a list
- Select a new color in the color chooser
- An old color value will be changed to new one with the same format(Hex and CSS)
If "GTK look and feel" is used, an alpha value is not available. So, in that case, this plugin doesn't show the color chooser for new Color(r, g, b, a)
.
You can generate color codes via a code generator(Alt + Ins).
- Run a code generator(Alt + Ins)
- Choose
Color...
- Choose the format you expect (e.g.
new Color(r, g, b)
) - Choose a color
- Click the OK button
- A color code is generated at the caret position
Tools > Options > Miscellaneous > Color Codes Preview
Default value is ^text/(x-)?(css|less|sass|scss)$
.
If you would like to disable/enable some mime-types, please change the default regex.
This pattern is used when the plugin checks a mime-type.
If you would like to enable xml files, please add |.*xml
. i.e. ^text/(x-)?(css|less|sass|scss|.*xml)$
This option is false
by default. If you would like to resolve Sass and Less variables, please check it.
NOTE: The simplest cases only e.g. $green: #0f0;
This option is false
by default. If you would like to show named colors, please check it.
If you would like to show colors of Color.decode(<hex>)
e.g. Color.decode("#000000")
, Please add java
to "Regex for enabled mime-types" of Hex and CSS e.g. (^text/(x-)?(css|less|sass|scss|java)$
)
If you have some requests, problems, and more, first of all, please submit them to Issues. Please don't create PRs soon. I'll request creating PRs if I need your help.
If you find typos or incorrect English, please let me know. If you would like to create a PR for fixing them, please do that.
- Colors may be shown if they are not color codes. e.g. "#feature" contains
#fea
. This plugin recognizes it as a hex color code. - If you use the GTK Look and Feel, you cannot change an alpha value in the color chooser.
- Hsl or hsla color values may not be changed correctly when you use the color chooser. (There may be 1% errors.)
- Doesn't recognize the following Java Color case:
new Color(0.25f, 0.50f, 0);
, in such a case, please addf
. i.e.0f
or1f
.