Thanks Jan-Marek and everyone else who replied. The suggestions have been really helpful. I'm making some progress. But I didn't know I had to deal with hue/saturation/intensity stuff for this.
I searched but couldn't find any documentation for gtk_hsv_to_rgb()?? One website (pretty old one) said it was a private function. Can anyone point me to the function's documentation if there's any? Thank you! Lola --- Jan-Marek Glogowski <[EMAIL PROTECTED]> wrote: > FYI - I just came up with the this example to > illustrate a way to change > the colors in a loop - it doesn't represent the > solution! > > Algo is still: > r = max, g = 0, b = 0 > r = max , g = max, b = 0 > r = 0, g = max, b = 0 > r = 0, g = max, b = max > r = 0, g = 0, b = max > r = max, g = 0, b = max > back to step 1 > > Quickest solution: Get yourself the latest source of > gtk+, there is the > file gtk/gtkhsv.c, which has the function > hsv_to_rgb. > > Ranges from 0.0 - 1.0. > hue = step * (i/max_step); > saturation = 1.0; > value = 1.0; > hsv_to_rgb(&hue, &saturation, &value); > > Now they contain the rgb - values > > r = hue * G_MAXUINT16; > g = saturation * G_MAXUINT16; > b = value * G_MAXUINT16; > > or use gtk_hsv_to_rgb... > > ... > > JMG > ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list