Monnoroch / ColorHighlighter

ColorHighlighter - is a plugin for the Sublime text 2 and 3, which underlays selected hexadecimal colorcodes (like "#FFFFFF", "rgb(255,255,255)", "white", etc.) with their real color. Also, plugin adds color picker to easily modify colors. Documentation: https://monnoroch.github.io/ColorHighlighter.
https://sublime.wbond.net/packages/Color%20Highlighter
1.31k stars 130 forks source link

What do I "update icon_factory.convert_command plugin setting" to? #406

Closed spacesuitdiver closed 6 years ago

spacesuitdiver commented 6 years ago

I receive this error and I'm not sure what to set convert_command to exactly?

ColorHighlighter: action=start st=st3
ColorHighlighter: action=create_icon style=circle color=#ffffffff
Traceback: error.

Output:

Error:
/bin/sh: convert: command not found

Highlighting colors with gutter icons is not supported with current ImageMagick setup. Try configuring the "icon_factory setting"
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 210, in on_api_ready
    m.plugin_loaded()
  File "main in /Users/leblancc/Library/Application Support/Sublime Text 3/Installed Packages/Color Highlighter.sublime-package", line 606, in plugin_loaded
  File "main in /Users/leblancc/Library/Application Support/Sublime Text 3/Installed Packages/Color Highlighter.sublime-package", line 319, in init
  File "main in /Users/leblancc/Library/Application Support/Sublime Text 3/Installed Packages/Color Highlighter.sublime-package", line 197, in provide_fake_color_scheme
  File "main in /Users/leblancc/Library/Application Support/Sublime Text 3/Installed Packages/Color Highlighter.sublime-package", line 188, in provide_fake_color_scheme_data
  File "color_scheme in /Users/leblancc/Library/Application Support/Sublime Text 3/Installed Packages/Color Highlighter.sublime-package", line 43, in parse_color_scheme
  File "./python3.3/xml/etree/ElementTree.py", line 1356, in XML
  File "<string>", line None
xml.etree.ElementTree.ParseError: XML or text declaration not at start of entity: line 6, column 0
environment variables loaded using: /bin/bash -l

Here's my config:

{
    "search_colors_in": {
        "selection": {
            "enabled": true,
            "color_highlighters": {
                "color_scheme": {
                    "enabled": false,
                    "highlight_style": "filled"
                },
                "gutter_icons": {
                    "enabled": false,
                    "icon_style": "circle"
                },
                "phantoms": {
                    "enabled": true,
                    "style": "right",
                    "length": 2
                }
            }
        },
        "all_content": {
            "enabled": true,
            "color_highlighters": {
                "color_scheme": {
                    "enabled": true,
                    "highlight_style": "text"
                },
                "gutter_icons": {
                    "enabled": true,
                    "icon_style": "circle"
                },
                "phantoms": {
                    "enabled": false,
                    "style": "right",
                    "length": 2
                }
            }
        },
        "hover": {
            "enabled": true,
            "color_highlighters": {
                "color_scheme": {
                    "enabled": false,
                    "highlight_style": "filled"
                },
                "gutter_icons": {
                    "enabled": false,
                    "icon_style": "circle"
                },
                "phantoms": {
                    "enabled": false,
                    "style": "right",
                    "length": 2
                }
            }
        }
    },
    "default_keybindings": true,
    "file_extensions": [".css", ".less", ".scss", ".sass", ".styl"],
    "icon_factory": {
        "convert_command": "convert",
        "convert_timeout": 5
    },
    "autoreload": {
        "when_settings_change": true,
        "when_color_scheme_change": true
    },
    "regex_compiler": {
        "channels": {
            "hex": "[0-9a-fA-F]",
            "dec": "\\d{1,3}",
            "float": "(?:[0|1])|(?:[1][\\.]?[0]*)|(?:[0]?[\\.]\\d*)",
            "perc": "(?:\\d{1,3}[%])|(?:0)"
        },
        "formats": {
            "sharp8": {
                "description": "Hex #RRGGBBAA color format",
                "regex": "#[0-9a-fA-F]{8}",
                "white": "#FFFFFFFF"
            },
            "sharp6": {
                "description": "Hex #RRGGBBAA color format",
                "regex": "#[0-9a-fA-F]{6}",
                "white": "#FFFFFF",
                "after": "sharp8"
            },
            "sharp4": {
                "description": "Hex #RGBA color format",
                "regex": "#(?P<R>hex)(?P<G>hex)(?P<B>hex)(?P<A>hex)",
                "white": "#FFFF",
                "after": "sharp6"
            },
            "sharp3": {
                "description": "Hex #RGB color format",
                "regex": "#(?P<R>hex)(?P<G>hex)(?P<B>hex)",
                "white": "#FFF",
                "after": "sharp4"
            },
            "rgba": {
                "description": "rgba(255,255,100%,1) color format",
                "regex": "rgba[(][ ]*(?P<R>dec|perc)[ ]*[,][ ]*(?P<G>dec|perc)[ ]*[,][ ]*(?P<B>dec|perc)[ ]*[,][ ]*(?P<A>float)[ ]*[)]",
                "white": "rgba(255, 255, 100%, 1)"
            },
            "rgb": {
                "description": "rgb(255,255,100%) color format",
                "regex": "rgb[(][ ]*(?P<R>dec|perc)[ ]*[,][ ]*(?P<G>dec|perc)[ ]*[,][ ]*(?P<B>dec|perc)[ ]*[)]",
                "white": "rgb(255, 255, 100%)"
            },
            "hsva": {
                "description": "hsva(hue 0..360, s%, v%, alpha 0.0 .. 1.0) color format",
                "regex": "hsva[(][ ]*(?P<H>dec)[ ]*[,][ ]*(?P<S>perc)[ ]*[,][ ]*(?P<V>perc)[ ]*[,][ ]*(?P<A>float)[ ]*[)]",
                "white": "hsva(0, 0%, 100%, 1.)"
            },
            "hsv": {
                "description": "hsv(hue 0..360, s%, v%) color format",
                "regex": "hsv[(][ ]*(?P<H>dec)[ ]*[,][ ]*(?P<S>perc)[ ]*[,][ ]*(?P<V>perc)[ ]*[)]",
                "white": "hsv(0, 0%, 100%)"
            },
            "hsla": {
                "description": "hsla(hue 0..360, s%, v%, alpha 0.0 .. 1.0) color format",
                "regex": "hsla[(][ ]*(?P<H>dec)[ ]*[,][ ]*(?P<S>perc)[ ]*[,][ ]*(?P<L>perc)[ ]*[,][ ]*(?P<A>float)[ ]*[)]",
                "white": "hsla(0, 0%, 100%, 1.)"
            },
            "hsl": {
                "description": "hsl(hue 0..360, s%, v%) color format",
                "regex": "hsl[(][ ]*(?P<H>dec)[ ]*[,][ ]*(?P<S>perc)[ ]*[,][ ]*(?P<L>perc)[ ]*[)]",
                "white": "hsl(0, 0%, 100%)"
            }
        }
    },
    "experimental": {
        "asynchronosly_update_color_scheme": false
    },
    "debug": true
}
Monnoroch commented 6 years ago

To the path to convert util on your machine.

spacesuitdiver commented 6 years ago

@Monnoroch okay thanks, I wasn't sure if I could map it to other ways/utilities of it converting the color or if it was in fact a path. I have a PR to clear this up in the README :) https://github.com/Monnoroch/ColorHighlighter/pull/407

ghost commented 5 years ago

Might I jump in and ask how - where - one does actually 'update' icon_factory.convert_command? That string is not present in my ~/.config/sublime-text-3/Packages/User/ColorHighlighter.sublime-settings nor in ~/.config/sublime-text-3/Packages/Color Highlighter/ColorHighlighter.sublime-settings.

itechnocrat commented 5 years ago

All stupid, no one can explain?