Jump to content
Sign in to follow this  
netherknight

Changing Cd saturation with attribute expression

Recommended Posts

Hi everyone, 

I'd like to be able to adjust the HSV via an attribute expression. What's easy is multiplying the point color with something like this: "value * fit(float(rand(@elemnum)),0,1,0.5,1.5)"

However, just using that expression multiplies the color with a random number giving a generally blacker/whiter color. 

What I would like is to be able to change the saturation separately. The result would be a set of X wires having the same color with a saturation/value range of 0.5 to 1.0 

Is there a good way of achieving this or do I need to stick to the simple multiplication?

 image.thumb.png.c61bc4f98768727494b06beac816f188.png

Share this post


Link to post
Share on other sites

if you want to use Attribute Expression you can use something like this

hsvtorgb(rgbtohsv(self)+value)

and then the value will represent offset in H, S, V (so start with 0,0,0 and add to corresponding channel as needed)

 

or this

hsvtorgb(rgbtohsv(self)*value)

and then the value will represent scale factor of H, S, V  (so start with 1,1,1 and add to corresponding channel as needed)

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×