Skip to content
This repository was archived by the owner on Jan 30, 2024. It is now read-only.

Commit 078a355

Browse files
authored
Always make the selection (the hex) lowercase.
1 parent 54289de commit 078a355

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

name_that_color.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def run(self, edit):
1919
selection_text = self.view.substr(selection).replace( ";", "" ).strip()
2020
color_name = self.color_name(selection_text).lower().replace(" ", "-").strip()
2121
color_name = re.sub( r"[^a-z-]+", "", color_name )
22-
replacement_text = "$" + color_name + ": " + selection_text + ";"
22+
replacement_text = "$" + color_name + ": " + selection_text.lower() + ";"
2323
self.view.replace(edit, selection, replacement_text)
2424

2525
def color_name(self, color):
@@ -1670,4 +1670,4 @@ def rgb(self, color):
16701670
["FFFFB4", "Portafino"],
16711671
["FFFFF0", "Ivory"],
16721672
["FFFFFF", "White"]
1673-
]
1673+
]

0 commit comments

Comments
 (0)