Remove the colour range function as it will not be used

This commit is contained in:
Veronica K. B. Olsen
2021-02-27 16:06:24 +01:00
parent dbbec86a13
commit 2fd2c18dfc
2 changed files with 1 additions and 59 deletions
-30
View File
@@ -150,36 +150,6 @@ def hexToInt(value, default=0):
return default
return default
def colRange(rgbStart, rgbEnd, nStep):
"""Generate a range of colours from one RGB value to another.
"""
if len(rgbStart) != 3 and len(rgbEnd) != 3 and nStep < 1:
logger.error("Cannot create colour range from given parameters")
return None
if nStep == 1:
return rgbStart
elif nStep == 2:
return [rgbStart, rgbEnd]
dC = [0, 0, 0]
for c in range(3):
cA = rgbStart[c]
cB = rgbEnd[c]
dC[c] = (cB-cA)/(nStep-1)
retCol = [rgbStart]
for n in range(nStep):
if n > 0 and n < nStep:
retCol.append([
int(retCol[n-1][0] + dC[0]),
int(retCol[n-1][1] + dC[1]),
int(retCol[n-1][2] + dC[2]),
])
retCol[-1] = rgbEnd
return retCol
def formatInt(theInt):
"""Formats an integer with k, M, G etc.
"""