4

I just installed Ubuntu 16.04 LTS version, then installed sublime-text 3 (build 3103) and ColorPicker tool.

I can access the ColorPicker tool using Ctrl+Shift+C and select a color, but the selected color does not appear on the window. ie. after I select a particular color and click ok nothing happens except closing the window. The color hashcode does not appear nor replace existing color value. It was working fine in my previous 14.04 version.

Where should I look for the problems???

3

Edit ~/.config/sublime-text-3/Packages/ColorPicker/lib/linux_colorpicker.py

Search this line:

if color_sel.run() == getattr(Gtk, 'RESPONSE_OK', Gtk.ResponseType.OK):

Change it to:

if color_sel.run() == getattr(Gtk, 'RESPONSE_OK', Gtk.ResponseType):

and save.

Source: https://github.com/weslly/ColorPicker/issues/82

2

Verify the shebang script-file-path is pointing to the correct python. In my case I was using python3 but the script was pointing to python2

So I edited the file,

~/.config/sublime-text-3/Packages/ColorPicker/lib/linux_colorpicker.py

in which the first line was

#!/usr/bin/env python

to call python3 like this:

#!/usr/bin/env python3

it helped me.

I hope it will help someone who may happen to face the same issue in future :)

1

Installing the some dependencies worked for me:

sudo apt install python-gi, python-pkg-resources, python-cairo, python-gi-cairo

I tried installing another color picker (called picker) from a .deb file and after installation it refused to work without the above dependencies. Once installed the color picker in Sublime also began working again.

0

First open the sublime text editor and go to the Preferences>>Browse Packages.
Now go to the ColorPicker>>lib and run the linux_colorpicker.py file using

$ python linux_colorpicker.py

If it is showing error like

import gtk as Gtk not found

then install the python gtk and glib using commands:

$ sudo apt-get install libgtk2.0-dev

now run the same python file and it will start working.

1
  • 1
    Hi Amrit and welcome to askubuntu! Please format your future commands in your post by using 4 spaces, or select with mouse and type ctrl+k .
    – abu_bua
    Jul 13 '18 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.