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

it is not work under mac os #344

Open tyrickareo opened 7 years ago

tyrickareo commented 7 years ago

i have repeat un-install operation several times,but it's still not work.

Kafkalasch commented 7 years ago

i can confirm this. colors are not recognized. bildschirmfoto 2017-03-17 um 02 25 25

Senumar commented 7 years ago

Yep, same here ☹️

gustavohellwig commented 7 years ago

I have the same problem. In my Mac is not working. Sometimes when I click at Tool/Color Highlighter/ Highlighter Style/ and change it, it does work, but that works only once.

XanxusVerVR commented 7 years ago

me to i have same problem

mo0kid commented 7 years ago

Also have same issue. I can only get to work if I disable and re enable highlight-all, fill. Seems that a self.redraw() is what it's taking to make it work. Context menus are greyed out.

Package Control installation on Build 3216 in Sierra 10.12.5

coagmano commented 7 years ago

Check your console with control + ` and see what error colorHighlighter is throwing. I had this problem when ImageMagick wasn't installed properly, so I just had to point colorHighligher at the convert command

greenroses commented 7 years ago

I have the same problem. Nothing happened when I click or move over the color text.

JessRiedel commented 7 years ago

I have this issue. I opened up the console per coagmano's instructions and found "Unable to open /Users//Library/Application Support/Sublime Text 3/Packages/Color Highlighter/ColorHighlighter.sublime-settings" However, this file is actually located at "/Users//Library/Application Support/Sublime Text 3/Packages/User/Color Highlighter/ColorHighlighter.sublime-settings". That is, there is actually a folder "User" between "Packages" and "Color Highlighter". Furthermore, this file correctly opens to be edited when I choose "Sublime>Preferences>Package Settings>ColorHighlighter>Settings--Default" from the dropdown menus.

So it appears the plugin needs to be edited to load the settings file using the correct path.

Monnoroch commented 7 years ago

@JessRiedel could you maybe try the new alpha version at #366?

JessRiedel commented 7 years ago

I'm a novice and haven't manually installed a Sublime package before, but I downloaded v8.0 as a zip file, unzipped it, and dragged the contents into /Users/<username>/Library/Application Support/Sublime Text 3/Packages. After this, "ColorHighlighter-8.0" appeared when I select Preferences>Package Control: List Packages, but it just says "No descriptions provided. Unknown version.". Also, new greyed-out commands appeared in the right-click menu ("Insert color with color picker", "Covert color to the next format", "Convert color to the previous format"). However, nothing worked, and pulling up the console revealed these errors.


ImportError: No module named 'ColorHighlighter-8' reloading plugin ColorHighlighter-8.0.topsort Traceback (most recent call last): File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 109, in reload_plugin m = importlib.import_module(modulename) File "./python3.3/importlib/init.py", line 90, in import_module File "", line 1584, in _gcd_import File "", line 1565, in _find_and_load File "", line 1512, in _find_and_load_unlocked File "", line 313, in _call_with_frames_removed File "", line 1584, in _gcd_import File "", line 1565, in _find_and_load File "", line 1512, in _find_and_load_unlocked File "", line 313, in _call_with_frames_removed File "", line 1584, in _gcd_import File "", line 1565, in _find_and_load File "", line 1529, in _find_and_load_unlocked ImportError: No module named 'ColorHighlighter-8'


Because it seemed like the 0 was being interpretted as an extension, I renamed the name of the unzipped package folder from ColorHighlighter-8.0 to color-highlighter. After this, the right-click menu had only one new command (Insert color with color picker) and it was not greyed out. But choosing that command did nothing, and this was the error in the console.


Exception: Match {} could not be canonicalized. Traceback (most recent call last): File "/Users/jriedel/Library/Application Support/Sublime Text 3/Packages/color-highlighter/pick_color_command.py", line 52, in _open_color_picker colors = [value for value in _get_colors(self.view, settings, formats, color_converter)] File "/Users/jriedel/Library/Application Support/Sublime Text 3/Packages/color-highlighter/pick_color_command.py", line 52, in colors = [value for value in _get_colors(self.view, settings, formats, color_converter)] File "/Users/jriedel/Library/Application Support/Sublime Text 3/Packages/color-highlighter/pick_color_command.py", line 91, in _get_colors for (region, color, match) in search_colors_in_selection(view, color_searcher): File "/Users/jriedel/Library/Application Support/Sublime Text 3/Packages/color-highlighter/color_selection_listener.py", line 66, in _generate_color_regions for color_data in color_searcher.search(view, line): File "/Users/jriedel/Library/Application Support/Sublime Text 3/Packages/color-highlighter/color_searcher.py", line 40, in search color = self._color_converter.to_color(groups) File "/Users/jriedel/Library/Application Support/Sublime Text 3/Packages/color-highlighter/color_converter.py", line 369, in to_color raise Exception("Match %s could not be canonicalized." % match) Exception: Match {} could not be canonicalized.


Most likely I'm making an obvious mistake because I've never done this. I can't devote any more time to it unfortunately.

willrowe commented 7 years ago

I believe the directory must be called ColorHighlighter. I'm not sure if that's what causing these particular issues, but it would cause some issues if not named correctly.

Monnoroch commented 7 years ago

@willrowe is absolutely correct.

JessRiedel commented 7 years ago

Didn't help.


Exception: Match {} could not be canonicalized. Traceback (most recent call last): File "/Users/jriedel/Library/Application Support/Sublime Text 3/Packages/ColorHighlighter/pick_color_command.py", line 52, in _open_color_picker colors = [value for value in _get_colors(self.view, settings, formats, color_converter)] File "/Users/jriedel/Library/Application Support/Sublime Text 3/Packages/ColorHighlighter/pick_color_command.py", line 52, in colors = [value for value in _get_colors(self.view, settings, formats, color_converter)] File "/Users/jriedel/Library/Application Support/Sublime Text 3/Packages/ColorHighlighter/pick_color_command.py", line 91, in _get_colors for (region, color, match) in search_colors_in_selection(view, color_searcher): File "/Users/jriedel/Library/Application Support/Sublime Text 3/Packages/ColorHighlighter/color_selection_listener.py", line 66, in _generate_color_regions for color_data in color_searcher.search(view, line): File "/Users/jriedel/Library/Application Support/Sublime Text 3/Packages/ColorHighlighter/color_searcher.py", line 40, in search color = self._color_converter.to_color(groups) File "/Users/jriedel/Library/Application Support/Sublime Text 3/Packages/ColorHighlighter/color_converter.py", line 369, in to_color raise Exception("Match %s could not be canonicalized." % match) Exception: Match {} could not be canonicalized.

johnnynines commented 7 years ago

I am now experiencing this problem. It happened literally overnight. When I started Sublime Text 3 back up Color Highlighter stopped working. I have removed the package and installed it several times with no avail.

My console output is below.

Traceback (most recent call last): File "set_setting_command in /Users/myUsername/Library/Application Support/Sublime Text 3/Installed Packages/Color Highlighter.sublime-package", line 125, in run File "set_setting_command in /Users/myUsername/Library/Application Support/Sublime Text 3/Installed Packages/Color Highlighter.sublime-package", line 212, in _set_setting File "settings in /Users/myUsername/Library/Application Support/Sublime Text 3/Installed Packages/Color Highlighter.sublime-package", line 32, in __init__ File "settings in /Users/myUsername/Library/Application Support/Sublime Text 3/Installed Packages/Color Highlighter.sublime-package", line 96, in __init__ File "settings in /Users/myUsername/Library/Application Support/Sublime Text 3/Installed Packages/Color Highlighter.sublime-package", line 116, in __init__ File "settings in /Users/myUsername/Library/Application Support/Sublime Text 3/Installed Packages/Color Highlighter.sublime-package", line 132, in __init__ File "settings in /Users/myUsername/Library/Application Support/Sublime Text 3/Installed Packages/Color Highlighter.sublime-package", line 191, in __init__ AssertionError Unable to open /Users/myUsername/Library/Application Support/Sublime Text 3/Packages/Color Highlighter/ColorHighlighter.sublime-settings

Any help is appreciated as this is a very useful tool in my workflow.

Thank you.