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