ColorPicker
A multi-platform color picker plugin
Details
Installs
- Total 1.49M
- Win 1.09M
- Mac 215K
- Linux 189K
Apr 19 | Apr 18 | Apr 17 | Apr 16 | Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | 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 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 9 | 20 | 34 | 30 | 56 | 23 | 25 | 16 | 68 | 52 | 32 | 28 | 48 | 28 | 47 | 92 | 65 | 44 | 39 | 29 | 25 | 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 |
Mac | 1 | 4 | 5 | 2 | 7 | 4 | 1 | 3 | 10 | 6 | 4 | 6 | 5 | 4 | 3 | 7 | 6 | 5 | 7 | 0 | 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 |
Linux | 1 | 6 | 4 | 7 | 7 | 7 | 2 | 5 | 5 | 4 | 5 | 6 | 6 | 2 | 8 | 3 | 5 | 6 | 2 | 7 | 5 | 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 |
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