junichi11 / netbeans-color-codes-preview

Show colors in an editor's sidebar
https://netbeans-vm.apache.org/pluginportal/catalogue/?id=24
Apache License 2.0
32 stars 8 forks source link
colors netbeans netbeans-plugin

NetBeans Color Codes Preview Plugin Build Status

This plugin shows a color codes preview in an editor's sidebar.

screenshot

Disable/Enable

Uncheck/Check View > Show Colors

Downloads

Supported color patterns

Multiple colors

Change a color using a color chooser

changing-colors

NOTE

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).

Generate color codes

You can generate color codes via a code generator(Alt + Ins).

  1. Run a code generator(Alt + Ins)
  2. Choose Color...
  3. Choose the format you expect (e.g. new Color(r, g, b))
  4. Choose a color
  5. Click the OK button
  6. A color code is generated at the caret position

generate-color-codes

Options

Tools > Options > Miscellaneous > Color Codes Preview

Hex and CSS colors

screenshot-options

Regex for enabled mime-types

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)$

Resolve Sass and Less Variables

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;

Named Colors

This option is false by default. If you would like to show named colors, please check it.

Java Color class colors

NOTE

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)$)

Contributing

Bugs & New Features

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.

Typos

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.

NOTE

Donation

https://github.com/sponsors/junichi11

License

Apache License, Version 2.0