; Create a 3D sphere with optional shadow
; The sphere's principle color will be the foreground
; bg-color: background color
; sphere-color: color of sphere
; radius: radius of the sphere in pixels
; light: angle of light source in degrees
; shadow: whather to create a shadow as well
On Friday 03 June 2005 04:40, Nolan Clayton wrote:
> I don't know if this is the right list but how do you change the
> Value (HSV) of a color in script-fu.
> I am playing with the sphere script. And I would like to change
> the lighting intensity.
> Color (255 0 0)
> I want a new color as if the only the value had been changed to
> like 50, so then the new color would be (128 0 0). Thanks in
> advance. _______________________________________________
The Bad news: there are no procedures in the PDB to deal with with RGB
<-> HSV conversion.
When I needed these, I was told to write my own conversion procedure
inside the script. (it was a python script, so it won't fit you).
> The Bad news: there are no procedures in the PDB to deal with with
> RGB <-> HSV conversion. When I needed these, I was told to write my
> own conversion procedure inside the script. (it was a python script,
> so it won't fit you).
There are RGB <-> HSV conversion routines in libgimpcolor. Language
bindings should provide this functionality.
In case anyone didn't get this. Here is how I changed the value of a
color in script-fu. You could do something similar for Saturation and I
guess hue, not sure though it would create the desired effect if you
played with the hue.
;;sphere-color is a color
;;light-i will be the new color
;;light-intensity is the new value (HSV)