def pseudocolor(val, minval, maxval):
    f = float(val - minval) / (maxval - minval)
r, g, b = 1 - f, f, 0.0
return r, g, b
if __name__ == '__main__':
    steps = 10
print('val       R      G      B')
for val in range(0, 100 + steps, steps):
    pass
Range values to pseudocolor