code: def _get_color(c, x, max_value):
      c = int(c)
      colors = [
          [1, 0, 1],
          [0, 0, 1],
          [0, 1, 1],
          [0, 1, 0],
          [1, 1, 0],
          [1, 0, 0],
      ]
      ratio = (float(x) / float(max_value)) * 5
      i = int(math.floor(ratio))
      j = int(math.ceil(ratio))
      ratio -= i
      r = (1 - ratio) * colors[i][c] + ratio * colors[j][c]
      return r
  
imports: from __future__ import division
  import math
  from collections import namedtuple
  from functools import cmp_to_key
  import numpy
label_desc: Use image node_id 19 for calling a global function with example usage: _get_color(c, x, max_value) and returns: r