get ramp color

Hi all,

I cant get rid of getting values of color in certain position of a ramp. I seen a thread that suggest to create a new colorentry, get color value for that and delete it, but sound strange that there isnt a faster way.

hope in a help
regards

I belive the only way to get arbitrary values of a ramp is to do something like this:

  • find the "place2Dtexture" node feeding the ramp it's UV's
  • set the uCoord and vCoord to the place in the ramp you want to get the color from (make sure its a normalized value (0-1))
  • then you can getAttr on the ramps .outColorR,.outColorG, .outColorB

--g