-
-
-void
-make_color_ramp (h1, s1, v1, h2, s2, v2,
- pixels, npixels)
- int h1, h2; /* 0 - 360 */
- double s1, s2, v1, v2; /* 0.0 - 1.0 */
- XColor *pixels;
- int npixels;
-{
- int dh = (h2 - h1) / npixels;
- double ds = (s2 - s1) / npixels;
- double dv = (v2 - v1) / npixels;
- int i;
- for (i = 0; i < npixels; i++)
- hsv_to_rgb ((h1 += dh), (s1 += ds), (v1 += dv),
- &pixels [i].red, &pixels [i].green, &pixels [i].blue);
-}
-
-
-void
-cycle_hue (color, degrees)
- XColor *color;
- int degrees;
-{
- int h;
- double s, v;
- rgb_to_hsv (color->red, color->green, color->blue,
- &h, &s, &v);
- h = (h + degrees) % 360;
- hsv_to_rgb (h, s, v, &color->red, &color->green, &color->blue);
-}