ColorPicker
A multi-platform color picker plugin
Details
Installs
- Total 1.44M
- Win 1.04M
- Mac 211K
- Linux 183K
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 | 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 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 7 | 123 | 170 | 172 | 145 | 171 | 122 | 156 | 105 | 128 | 150 | 132 | 154 | 112 | 119 | 129 | 121 | 162 | 162 | 143 | 98 | 117 | 122 | 156 | 133 | 200 | 144 | 116 | 123 | 126 | 146 | 169 | 161 | 119 | 64 | 49 | 110 | 106 | 118 | 133 | 110 | 73 | 80 | 92 | 148 | 131 |
Mac | 2 | 12 | 10 | 17 | 21 | 14 | 8 | 6 | 13 | 7 | 12 | 15 | 32 | 9 | 6 | 8 | 17 | 12 | 9 | 13 | 8 | 7 | 13 | 12 | 55 | 9 | 25 | 8 | 8 | 10 | 17 | 10 | 15 | 8 | 4 | 3 | 4 | 11 | 7 | 13 | 13 | 9 | 11 | 14 | 10 | 8 |
Linux | 3 | 7 | 16 | 9 | 20 | 14 | 9 | 7 | 7 | 12 | 17 | 18 | 17 | 18 | 15 | 20 | 12 | 13 | 15 | 11 | 9 | 9 | 10 | 10 | 30 | 17 | 15 | 20 | 14 | 12 | 14 | 3 | 13 | 10 | 11 | 8 | 13 | 14 | 7 | 3 | 9 | 17 | 15 | 7 | 14 | 13 |
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