def get_gradient(self, value, colors, upper_limit=<NUM_LIT:100>):
index = int(self.percentage(value, upper_limit))<EOL>if index >= len(colors):<EOL><INDENT>return colors[-<NUM_LIT:1>]<EOL><DEDENT>elif index < <NUM_LIT:0>:<EOL><INDENT>return colors[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>return colors[index]<EOL><DEDENT>
Map a value to a color
:param value: Some value
:return: A Hex color code