code: def create_colormap2d_4dirs(size=512):
      rgb = np.ones((size, size, 3), dtype=np.float32)
      hs = size // 2
      u, v = np.meshgrid(np.linspace(1, 0, hs), np.linspace(1, 0, hs))
      rgb[:hs, :hs, 0] = 1.0
      rgb[:hs, :hs, 1] = 1.0 - v + u / 2.0
      rgb[:hs, :hs, 2] = 1.0 - np.maximum(u, v)
      u = u[:, ::-1]
      rgb[:hs, hs:, 0] = 1.0 - u + v
      rgb[:hs, hs:, 1] = 1.0 - np.maximum(u, v)
      rgb[:hs, hs:, 2] = 1.0 - v + u
      v = v[::-1, :]
      rgb[hs:, hs:, 0] = 1.0 - np.maximum(u, v)
      rgb[hs:, hs:, 1] = 1.0 - u + v
      rgb[hs:, hs:, 2] = 1.0 - v + u
      u = u[:, ::-1]
      rgb[hs:, :hs, 0] = 1.0 - v + u / 2.0
      rgb[hs:, :hs, 1] = 1.0
      rgb[hs:, :hs, 2] = 1.0 - np.maximum(u, v)
      rgb = np.minimum(1.0, rgb)
      return rgb
  
file_path: vispy/examples/demo/gloo/unstructured_2d.py
imports: import sys
  import numpy
  import scipy.spatial
  from vispy import gloo, app
  from vispy.util.transforms import ortho
label_desc: Use image node_id 2 for calling a global function with example usage: create_colormap2d_4dirs(size) and returns: rgb