Skip to content

Commit

Permalink
Merge pull request #7 from SimplyPhy/updated-hotkeys
Browse files Browse the repository at this point in the history
Updated hotkeys
  • Loading branch information
atadams committed Aug 29, 2016
2 parents 43fab76 + 11217b7 commit c04ad94
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 36 deletions.
24 changes: 18 additions & 6 deletions Default (Linux).sublime-keymap
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
[
{
"keys": ["shift+ctrl+u"],
"command": "rgb_to_hsl",
"args":
{
"convert_all" : true
}
"command": "rgb_to_hsl"
},
{
"keys": ["shift+ctrl+alt+u"],
"command": "rgb_to_hsl",
"args":
{
"convert_all" : true,
"force_alpha" : true
}
},
{
"keys": ["shift+ctrl+u", "shift+ctrl+u"],
"command": "rgb_to_hsl",
"args":
{
"convert_all" : true
}
},
{
"keys": ["shift+ctrl+alt+u", "shift+ctrl+alt+u"],
"command": "rgb_to_hsl",
"args":
{
"convert_all" : true,
"force_alpha" : true
}
}
]
24 changes: 18 additions & 6 deletions Default (OSX).sublime-keymap
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
[
{
"keys": ["shift+ctrl+u"],
"command": "rgb_to_hsl",
"args":
{
"convert_all" : true
}
"command": "rgb_to_hsl"
},
{
"keys": ["shift+ctrl+alt+u"],
"command": "rgb_to_hsl",
"args":
{
"convert_all" : true,
"force_alpha" : true
}
},
{
"keys": ["shift+ctrl+u", "shift+ctrl+u"],
"command": "rgb_to_hsl",
"args":
{
"convert_all" : true
}
},
{
"keys": ["shift+ctrl+alt+u", "shift+ctrl+alt+u"],
"command": "rgb_to_hsl",
"args":
{
"convert_all" : true,
"force_alpha" : true
}
}
]
24 changes: 18 additions & 6 deletions Default (Windows).sublime-keymap
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
[
{
"keys": ["shift+ctrl+u"],
"command": "rgb_to_hsl",
"args":
{
"convert_all" : true
}
"command": "rgb_to_hsl"
},
{
"keys": ["shift+ctrl+alt+u"],
"command": "rgb_to_hsl",
"args":
{
"convert_all" : true,
"force_alpha" : true
}
},
{
"keys": ["shift+ctrl+u", "shift+ctrl+u"],
"command": "rgb_to_hsl",
"args":
{
"convert_all" : true
}
},
{
"keys": ["shift+ctrl+alt+u", "shift+ctrl+alt+u"],
"command": "rgb_to_hsl",
"args":
{
"convert_all" : true,
"force_alpha" : true
}
}
]
20 changes: 10 additions & 10 deletions Main.sublime-menu
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@
"children":
[
{
"caption": "Convert All RGB to HSL",
"caption": "Convert Selected RGB to HSL",
"command": "rgb_to_hsl"
},
{
"caption": "Convert Selected RGB to HSLA",
"command": "rgb_to_hsl",
"args":
{
"convert_all" : true
"force_alpha" : true
}
},
{
"caption": "Convert All RGB to HSLA",
"caption": "Convert All RGB to HSL",
"command": "rgb_to_hsl",
"args":
{
"convert_all" : true,
"force_alpha" : true
"convert_all" : true
}
},
{
"caption": "Convert Selected RGB to HSL",
"command": "rgb_to_hsl"
},
{
"caption": "Convert Selected RGB to HSLA",
"caption": "Convert All RGB to HSLA",
"command": "rgb_to_hsl",
"args":
{
"convert_all" : true,
"force_alpha" : true
}
}
Expand Down
2 changes: 1 addition & 1 deletion messages.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"2.0.0": "messages/2.0.0.txt"
"2.0.1": "messages/2.0.1.txt"
}
22 changes: 20 additions & 2 deletions messages/2.0.0.txt → messages/2.0.1.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
Version 2.0.0
Version 2.0.1

Changed

* Commands for ‘Convert All’ now work on ‘Convert Selected’ instead.

* Commands for ’Convert All’ now require double hotkey input.

Updated Usage

* Convert Selected to HSL: shift+ctrl+U
* Convert Selected to HSLA: shift+ctrl+alt+U
* Convert All to HSL (preserving alpha): shift+ctrl+U + shift+ctrl+U
* Convert All to HSLA (force alpha): shift+ctrl+alt+U + shift+ctrl+alt+U

________________________

Notes from Version 2.0.0


* Now converts RGB and RGBA colors.

Expand All @@ -12,7 +30,7 @@ Version 2.0.0
* You can now convert all colors in a file with a single command (shift+ctrl+U).


Usage
Usage (see Updated Usage in Version 2.0.1 above)

* Convert All to HSL (preserving alpha): shift+ctrl+U
* Convert All to HSLA (force alpha): shift+ctrl+alt+U
Expand Down
10 changes: 5 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ You can install using [Package Control](http://wbond.net/sublime_packages/packag
# Version 2 Features
* Version 2 now converts hex and RGB to HSL and RGBA to HSLA. The previous version only converted hex to HSL.
* Optionally, you can convert hex, RGB, and RGBA to HSLA (force alpha).
* You can now convert all hex, RGB, and RGBA colors in a file with a single command (`shift+ctrl+U`).
* You can now convert all hex, RGB, and RGBA colors in a file by inputting the following command twice: (`shift+ctrl+U`).

# Usage
* Convert All to HSL (preserving alpha): `shift+ctrl+U`
* Convert All to HSLA (force alpha): `shift+ctrl+alt+U`
* Convert Selected to HSL: `Edit > RGB to HSL`
* Convert Selected to HSLA: `Edit > RGB to HSL`
* Convert Selected to HSL: shift+ctrl+U
* Convert Selected to HSLA: shift+ctrl+alt+U
* Convert All to HSL (preserving alpha): shift+ctrl+U + shift+ctrl+U
* Convert All to HSLA (force alpha): shift+ctrl+alt+U + shift+ctrl+alt+U

# Why No Hex/HSL to RGB support
HSL color is just better than hex or RGB ([Brandon Mathis](http://brandonmathis.com/blog/2011/03/02/hslpicker.com-released/) gives a good explanation why HSL rocks). I don't see any use for RGB—HSL is just more intuitive and makes it much easier to [combine colors](http://www.colorsontheweb.com/combiningcolors.asp) into a logical color scheme.
Expand Down

0 comments on commit c04ad94

Please sign in to comment.