ColorPicker
A multi-platform color picker plugin
Details
Installs
- Total 1.49M
- Win 1.09M
- Mac 215K
- Linux 188K
Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | Feb 8 | Feb 7 | Feb 6 | Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | Jan 8 | Jan 7 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 40 | 39 | 53 | 68 | 36 | 40 | 35 | 33 | 84 | 64 | 40 | 38 | 30 | 25 | 28 | 46 | 32 | 46 | 40 | 20 | 25 | 47 | 44 | 37 | 44 | 42 | 21 | 21 | 30 | 44 | 56 | 43 | 36 | 19 | 32 | 26 | 32 | 53 | 55 | 35 | 29 | 27 | 38 | 46 | 44 | 64 |
Mac | 6 | 5 | 2 | 4 | 5 | 2 | 3 | 9 | 5 | 2 | 4 | 5 | 7 | 4 | 2 | 6 | 6 | 7 | 3 | 3 | 4 | 8 | 9 | 8 | 6 | 6 | 2 | 3 | 3 | 3 | 7 | 6 | 3 | 2 | 3 | 3 | 6 | 7 | 6 | 6 | 7 | 3 | 4 | 4 | 8 | 7 |
Linux | 1 | 5 | 5 | 2 | 5 | 5 | 1 | 8 | 7 | 2 | 4 | 5 | 4 | 5 | 5 | 11 | 6 | 3 | 3 | 8 | 9 | 3 | 3 | 17 | 5 | 5 | 6 | 7 | 4 | 3 | 4 | 2 | 3 | 9 | 5 | 5 | 4 | 5 | 3 | 5 | 5 | 6 | 10 | 4 | 4 | 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