ctrl+shift+p filters: :st2 :st3 :win :osx :linux

更新时间:2020-05-29 05:16:17

Browse

Color​Picker

by Weslly H. ALL Top 25

A multi-platform color picker plugin

Labels css

Details

Installs

  • Total 1.21M
  • Win 857K
  • Mac 194K
  • Linux 164K
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 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13
Windows 333 313 376 356 297 285 334 416 338 377 401 265 337 359 399 398 416 412 309 348 396 366 403 397 388 322 354 346 375 380 410 397 313 319 390 341 438 439 394 348 391 388 427 416 394 383
Mac 41 44 31 22 31 29 23 24 40 42 36 34 33 25 26 27 36 38 28 34 26 29 28 33 34 27 27 35 28 36 27 36 33 25 53 36 40 40 34 29 28 49 39 35 31 46
Linux 39 55 62 56 49 47 47 53 50 49 41 44 41 49 46 47 52 50 49 49 38 50 47 45 48 60 56 60 57 50 53 57 54 60 61 43 44 46 46 41 47 50 55 50 61 51

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

Acknowledgements