<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

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