def diffcolorhex(rownum):
"""
uses predefined lookup table to return distinct colors
"""
readFile = open('hex_colors.txt', 'r')
sepFile = readFile.read().split('\n')
readFile.close()
x = []
for plotPair in sepFile:
k = list(colors.hex2color(plotPair))
# print(list(k))
x.append(k)
if rownum > len(x):
rownumf = len(x) - 1
print('rownum: %s exceeds length of colors: %s' % (rownum, len(x)))
else:
rownumf = rownum
return (x[rownumf])
评论列表
文章目录