Skip to content
This repository was archived by the owner on Aug 11, 2025. It is now read-only.

Commit 8756f37

Browse files
committed
Added a Command Palette shortcut
You can now select the "convert" action from the Command Palette.
1 parent 034b0e9 commit 8756f37

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Default.sublime-commands

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[
2+
{ "caption": "Color Convert: convert", "command": "colorconvert" }
3+
]

colorconvert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def run(self, edit):
321321
elif hsl_match is not None:
322322

323323
# Get all the color channels.
324-
h = float(hsl_match.group(1))
324+
h = float(hsl_match.group(1).strip('%'))
325325
s = float(hsl_match.group(2).strip('%'))
326326
l = float(hsl_match.group(3).strip('%'))
327327

0 commit comments

Comments
 (0)