ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Gutter Color

by ggordan ST3

A Sublime Text 3 plugin which displays a colour in the gutter if the line contains a colour.

Details

Installs

  • Total 53K
  • Win 27K
  • OS X 18K
  • Linux 8K
May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11
Windows 23 22 34 32 24 18 14 23 23 32 34 46 29 19 31 29 35 18 36 28 34 24 26 30 30 21 23 18 34 34 22 31 51 19 25 34 30 30 44 20 30 27 37 27 37 57
OS X 10 15 11 10 7 11 8 11 14 15 16 15 5 6 12 10 8 19 18 8 7 13 13 16 16 11 13 7 9 12 11 7 14 3 8 4 14 12 9 15 5 12 8 15 23 16
Linux 6 2 5 11 4 5 7 6 5 10 12 14 6 4 8 7 8 5 5 5 4 9 13 21 5 3 6 3 8 10 13 7 8 1 5 6 3 3 10 7 4 5 2 8 5 6

Readme

Source
raw.​githubusercontent.​com

Gutter Color

Gutter Color is a cross-platform Sublime Text plugin which displays a colored icon for all lines which contain a color.

GutterColor

Requirements

Configure

  • Install ImageMagick
  • Set the convert_path in Preferences: Package Settings > GutterColor > Settings – User to the location of the ImageMagick convert script:
{
  "convert_path" : "/usr/local/bin/convert"
}
  • For help with either, view this blog post by Wes Bos
  • Additional user settings:
    • supported_syntax sets the filetypes the script runs in.
    • use_transparency determines whether to draw RGBA, HSLA, and custom formats with alpha channels enabled, compositing the fill color over a checkered gray background. Setting this to "light" is the same as true, but uses a lighter checkerboard.
    • custom_colors adds additional regexes for custom color string formats, along with associated string matching and affixing rules. (See default settings file.)
    • fix_color_schemes enables automatic editing of the current tmTheme to correct ST's icon tinting. (See Icon Tinting and Light Color Schemes below.)

Troubleshooting

Fixing ImageMagick on OSX

If you're experiencing issues with ImageMagick (installed via brew) when using GutterColor on OSX, follow these instructions to fix it.

  1. Uninstall IM with brew uninstall imagemagick
  2. Install again with a couple of options brew install imagemagick --with-xz --with-font-config --with-little-cms --with-little-cms2
  3. Check the location of convert with type convert
  4. Copy the location and edit the GutterColor/Settings - User convert_path to be the value of step 3.

Icon Tinting and Light Color Schemes

Sublime Text automatically tints gutter icons to match your background color settings. Unfortunately this can cause Gutter Color's samples to vary from slightly inaccurate to completely black. To counteract this effect, Gutter Color can generate a new copy of your current color scheme that sets the background to black only for the scope of the plugin. You will not see any visual changes other than the icons.

Animation of a user running the "Fix Current Color Scheme" command.

  • To manually update a color scheme, open the Command Palette and select GutterColor: Fix Current Color Scheme.
  • Alternatively, the plugin can run this process automatically via the setting fix_color_schemes.

Other Display Issues

Sublime's placeholder image is a red-and-yellow-striped box. If you are seeing these, it is most likely that Gutter Color cannot find ImageMagick to generate the samples. Double-check that you have your convert_path setting and/or your PATH environment variable set correctly, and restart Sublime Text. If the problem persists, feel free to contact us.

TODO

  • Add support for SASS/LESS variables
  • Backport to ST2
  • Handle conflicts with GitGutter/VCS Gutter
  • Support for CSS gradients
  • Better cleanup processes

Thanks

Thanks to all of the contributors who continue to improve GutterColor!

License

MIT.