ColorPicker
A multi-platform color picker plugin
Details
Installs
- Total 1.49M
- Win 1.09M
- Mac 215K
- Linux 188K
Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 8 | 19 | 61 | 24 | 31 | 20 | 22 | 19 | 27 | 27 | 30 | 32 | 48 | 31 | 34 | 23 | 27 | 43 | 44 | 48 | 53 | 18 | 32 | 29 | 42 | 42 | 49 | 39 | 29 | 35 | 40 | 35 | 33 | 50 | 37 | 29 | 25 | 50 | 39 | 53 | 68 | 36 | 40 | 35 | 33 | 84 |
Mac | 0 | 1 | 2 | 4 | 3 | 6 | 6 | 5 | 0 | 3 | 3 | 5 | 4 | 2 | 2 | 4 | 6 | 1 | 3 | 3 | 8 | 2 | 4 | 3 | 0 | 7 | 9 | 4 | 0 | 3 | 2 | 2 | 4 | 5 | 7 | 2 | 0 | 7 | 5 | 2 | 4 | 5 | 2 | 3 | 9 | 5 |
Linux | 0 | 4 | 7 | 3 | 3 | 3 | 8 | 7 | 2 | 7 | 6 | 6 | 8 | 2 | 8 | 7 | 4 | 5 | 4 | 3 | 4 | 4 | 11 | 7 | 3 | 6 | 6 | 4 | 4 | 1 | 4 | 7 | 3 | 4 | 4 | 1 | 5 | 1 | 5 | 5 | 2 | 5 | 5 | 1 | 8 | 7 |
Readme
- Source
- raw.githubusercontent.com
Mac OSX
Linux
Windows
Installation
Install this repository via Package Control.
Usage
To insert or change a selected color, use:
- Linux:
ctrl+shift+c
- Windows:
ctrl+shift+c
- OS X:
cmd+shift+c
or use menu action
Tools
** -> **ColorPicker
By default, the hex color code is inserted using uppercase letters. To use lowercase letters instead, copy the contents of **Preferences -> Package Settings -> ColorPicker -> Settings-Default
** to the empty file created by selecting **Preferences -> Package Settings -> ColorPicker -> Settings-User
**, then change "color_upper_case"
to false
.
Calling from Other Plugins
To commands are provided to assist in calling a color picker from other plugins. Info is shared between the plugins via a settings file. It does not have to exist on disk; it can exist only in memory for the sole purpose of sharing the return. It is advised to use a unique name for the settings file. The data is returned in the settings key color_pick_return
. It is advised to set color_pick_return
to None
in your settings file before calling any of the commands. So you can tell if it set teh variable or not.
ColorPickApiIsAvailableCommand
This command is used to test if ColorPicker is installed.
>> settings = sublime.load_settings('my_shared.sublime-settings')
>> settings.set('color_pick_return', None)
>> sublime.run_command('color_pick_api_is_available', {'settings': 'my_shared.sublime-settings'})
>> print(settings.get('color_pick_return'))
True
ColorPickApiGetColorCommand
This command is used to call a color picker and get the selected value. It takes a setings file and an optional default_color
.
>> settings = sublime.load_settings('my_shared.sublime-settings')
>> settings.set('color_pick_return', None)
>> sublime.run_command('color_pick_api_get_color', {'settings': 'my_shared.sublime-settings', 'default_color': '#ff0000'})
>> print(settings.get('color_pick_return'))
#23af44