Index: /branches/eam_branches/ipp-20150405/Ohana/src/kapa2/doc/rainbow.cm
===================================================================
--- /branches/eam_branches/ipp-20150405/Ohana/src/kapa2/doc/rainbow.cm	(revision 38146)
+++ /branches/eam_branches/ipp-20150405/Ohana/src/kapa2/doc/rainbow.cm	(revision 38146)
@@ -0,0 +1,3 @@
+0.25 0.0 0.0 1.0
+0.50 0.0 1.0 0.0
+0.75 1.0 0.0 0.0
Index: /branches/eam_branches/ipp-20150405/Ohana/src/kapa2/doc/vista.cm
===================================================================
--- /branches/eam_branches/ipp-20150405/Ohana/src/kapa2/doc/vista.cm	(revision 38146)
+++ /branches/eam_branches/ipp-20150405/Ohana/src/kapa2/doc/vista.cm	(revision 38146)
@@ -0,0 +1,7 @@
+0.10 0.5 0.8 0.0
+0.28 0.0 1.0 0.2
+0.35 0.2 1.0 0.7
+0.45 0.0 0.0 1.0
+0.60 1.0 0.0 0.9
+0.75 0.6 0.0 0.0
+0.90 0.8 0.0 0.0
Index: /branches/eam_branches/ipp-20150405/Ohana/src/kapa2/src/SetColormap.c
===================================================================
--- /branches/eam_branches/ipp-20150405/Ohana/src/kapa2/src/SetColormap.c	(revision 38145)
+++ /branches/eam_branches/ipp-20150405/Ohana/src/kapa2/src/SetColormap.c	(revision 38146)
@@ -205,4 +205,67 @@
     goto store_colors;
   }
+
+  /* anuenue */
+  if (!strncmp (name, "file:", 5)) {
+    FILE *f = fopen (&name[5], "r");
+    if (!f) {
+      fprintf (stderr, "failed to open colormap file %s\n", &name[5]);
+      return FALSE;
+    }
+    char line[1024];
+
+    int lastIndex = 0;
+    float lastRed = 0.0;
+    float lastBlue = 0.0;
+    float lastGreen = 0.0;
+
+    float fracIndex, fracRed, fracBlue, fracGreen;
+
+    while (scan_line_maxlen (f, line, 1024) != EOF) {
+      // file contains f R G B : f = 0.0 - 1.0, R,G,B = 0.0 - 1.0
+      int Nscan = sscanf (line, "%f %f %f %f", &fracIndex, &fracRed, &fracBlue, &fracGreen);
+      if (Nscan != 4) continue;
+
+      int nextIndex = fracIndex * MaxValue;
+      if (nextIndex <= lastIndex) {
+	lastRed = fracRed;
+	lastBlue = fracBlue;
+	lastGreen = fracGreen;
+	continue;
+      }
+      float dRdI = (fracRed   - lastRed)   / (float) (nextIndex - lastIndex);
+      float dBdI = (fracBlue  - lastBlue)  / (float) (nextIndex - lastIndex);
+      float dGdI = (fracGreen - lastGreen) / (float) (nextIndex - lastIndex);
+      for (i = lastIndex; i < nextIndex; i++) {
+	float redValue   = 0xffff * (dRdI * (i - lastIndex) + lastRed);
+	float blueValue  = 0xffff * (dBdI * (i - lastIndex) + lastBlue);
+	float greenValue = 0xffff * (dGdI * (i - lastIndex) + lastGreen);
+	SETVALUE (graphic[0].cmap[i].red,   redValue,   0, 0xffff);
+	SETVALUE (graphic[0].cmap[i].blue,  blueValue,  0, 0xffff);
+	SETVALUE (graphic[0].cmap[i].green, greenValue, 0, 0xffff);
+      }
+      lastRed = fracRed;
+      lastBlue = fracBlue;
+      lastGreen = fracGreen;
+      lastIndex = nextIndex;
+    }
+    fclose (f);
+
+    if ((int) (MaxValue*fracIndex) < MaxValue) {
+      float dRdI = (1.0 - lastRed)   / (float) (MaxValue - lastIndex);
+      float dBdI = (1.0 - lastBlue)  / (float) (MaxValue - lastIndex);
+      float dGdI = (1.0 - lastGreen) / (float) (MaxValue - lastIndex);
+      for (i = lastIndex; i < MaxValue; i++) {
+	float redValue   = 0xffff * (dRdI * (i - lastIndex) + lastRed);
+	float blueValue  = 0xffff * (dBdI * (i - lastIndex) + lastBlue);
+	float greenValue = 0xffff * (dGdI * (i - lastIndex) + lastGreen);
+	SETVALUE (graphic[0].cmap[i].red,   redValue,   0, 0xffff);
+	SETVALUE (graphic[0].cmap[i].blue,  blueValue,  0, 0xffff);
+	SETVALUE (graphic[0].cmap[i].green, greenValue, 0, 0xffff);
+      }
+    }
+    goto store_colors;
+  }
+
   return (FALSE);
 
