Skip to content

Commit

Permalink
Make color parameter caps (#81)
Browse files Browse the repository at this point in the history
So now if you do -c Red instead of  -c RED, it works too.
  • Loading branch information
u0nel committed Nov 1, 2020
1 parent da49f61 commit 81f30a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyfiglet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ def getFonts(self):
def color_to_ansi(color, isBackground):
if not color:
return ''

color = color.upper()
if color.count(';') > 0 and color.count(';') != 2:
raise InvalidColor('Specified color \'{}\' not a valid color in R;G;B format')
elif color.count(';') == 0 and color not in COLOR_CODES:
Expand Down

0 comments on commit 81f30a5

Please sign in to comment.