ColorPicker
A multi-platform color picker plugin
Details
Installs
- Total 1.45M
- Win 1.06M
- Mac 212K
- Linux 185K
Jun 9 | Jun 8 | Jun 7 | Jun 6 | Jun 5 | Jun 4 | Jun 3 | Jun 2 | Jun 1 | May 31 | May 30 | May 29 | May 28 | May 27 | May 26 | May 25 | May 24 | May 23 | May 22 | May 21 | May 20 | May 19 | May 18 | May 17 | May 16 | May 15 | May 14 | May 13 | May 12 | May 11 | May 10 | May 9 | May 8 | May 7 | May 6 | May 5 | May 4 | May 3 | May 2 | May 1 | Apr 30 | Apr 29 | Apr 28 | Apr 27 | Apr 26 | Apr 25 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 28 | 90 | 98 | 122 | 106 | 74 | 110 | 108 | 111 | 106 | 85 | 142 | 69 | 78 | 81 | 83 | 99 | 143 | 114 | 95 | 76 | 95 | 109 | 143 | 164 | 112 | 88 | 62 | 98 | 109 | 107 | 117 | 113 | 61 | 109 | 140 | 136 | 124 | 102 | 112 | 86 | 87 | 127 | 131 | 145 | 179 |
Mac | 1 | 5 | 8 | 14 | 14 | 10 | 6 | 10 | 14 | 10 | 11 | 9 | 5 | 8 | 10 | 11 | 7 | 8 | 14 | 8 | 5 | 4 | 13 | 11 | 20 | 9 | 5 | 4 | 4 | 7 | 6 | 8 | 11 | 4 | 8 | 11 | 13 | 12 | 7 | 11 | 3 | 6 | 12 | 7 | 11 | 12 |
Linux | 1 | 9 | 8 | 14 | 7 | 3 | 12 | 11 | 16 | 5 | 16 | 12 | 11 | 7 | 4 | 10 | 9 | 10 | 14 | 7 | 6 | 12 | 12 | 16 | 10 | 8 | 7 | 8 | 13 | 6 | 9 | 6 | 3 | 8 | 15 | 7 | 8 | 6 | 8 | 9 | 10 | 17 | 8 | 11 | 8 | 9 |
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