A formula for determining colors.

def colorize(occurence,maxoccurence,minoccurence):
    '''A formula for determining colors.'''
    if occurence == maxoccurence:
        color = (255,0,0)
    elif occurence == minoccurence:
        color = (0,0,255)
    else:
        color = (int((float(occurence)/maxoccurence*255)),0,int(float(minoccurence)/occurence*255))
    return color