From 04afd19a53c6773df4ed7fea7aaf2ddf8707cc8c Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 20 Jan 2025 01:35:49 -0500 Subject: big readme overhaul, full instructions on flags and such now --- color-converter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'color-converter.py') diff --git a/color-converter.py b/color-converter.py index 324d271..9f5620d 100644 --- a/color-converter.py +++ b/color-converter.py @@ -349,7 +349,6 @@ def RGBtoHSVorHSL(rgbValues, convertTo) : chroma = xMax - xMin # Convert by following formula - value = xMax lightness = (xMax + xMin) / 2 @@ -501,9 +500,11 @@ def extractValues(color, numValues, isHex = False) : while i < len(color) : if color[i].isnumeric() or color[i] == '.' : tempValue += color[i] - elif len(tempValue) > 0 : + elif len(tempValue) > 0 and tempValue != '.' : extractedValues.append(tempValue) tempValue = '' + else : + tempValue = '' if len(extractedValues) == numValues : break i = i + 1 -- cgit v1.3.1-4-g156e