HSV value

About advanced scenes, and the Thyme scripting language used in Algodoo.

HSV value

Postby standardtoaster » Sun Sep 20, 2009 4:34 am

In a true HSV value the Hue should go up to 359, the Saturation should go up to 100, and the Value should go up to 100. Why is this not the case in Algodoo?

I need to know this because I was planning on redoing my gradient maker with solid colors instead of transparency. I also wanted to be able to give it the initial starting color, give it the ending color, and then make the gradient based on that, fading from the initial starting color to the ending color. This is crucial information I need to know.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: HSV value

Postby blahblah200 » Sun Sep 20, 2009 10:49 am

It isn't this in Algodoo because it isn't HSV like it is on the sliders.
The Algodoo colors work by the RGB (Red, Green, Blue) system rather than the HSV (Hue, Saturation, Value) system.
Hope I helped :!: :!: :thumbup:
Image<-- Made with GIMP
User avatar
blahblah200
 
Posts: 61
Joined: Tue Sep 01, 2009 11:33 am
Location: Somewhere over the rainbow...

Re: HSV value

Postby gradyfitz » Sun Sep 20, 2009 12:29 pm

standardtoaster wrote:In a true HSV value the Hue should go up to 359, the Saturation should go up to 100, and the Value should go up to 100. Why is this not the case in Algodoo?

I need to know this because I was planning on redoing my gradient maker with solid colors instead of transparency. I also wanted to be able to give it the initial starting color, give it the ending color, and then make the gradient based on that, fading from the initial starting color to the ending color. This is crucial information I need to know.

Ok, to get HSV in that value range:
Code: Select all
(color)=>{[(Math.RGB2HSV(color)(0)),(Math.RGB2HSV(color)(1) * 100),(Math.RGB2HSV(color)(2) * 100)]}

Should work (Hue goes up to ~359, Saturation goes up to 1.0 (decimal value) and Value goes up to 1.0 (decimal value) ).

Though, this one doesn't have transparency (using RGB2HSV will take and return opacity if you send it in :)).
Mechanisms: 18 Mechanisms.
Thyme: Tutorial - Variables/Commands List.
Thymechanic
gradyfitz
 
Posts: 174
Joined: Tue Sep 01, 2009 8:33 am
Location: Victoria, Australia

Re: HSV value

Postby standardtoaster » Sun Sep 20, 2009 4:24 pm

blahblah200 wrote:It isn't this in Algodoo because it isn't HSV like it is on the sliders.
The Algodoo colors work by the RGB (Red, Green, Blue) system rather than the HSV (Hue, Saturation, Value) system.
Hope I helped :!: :!: :thumbup:

If that was the case then then the first three digits would be able to go up to 255.

@Gradyfitz: I'll try it later today. I hope it's what I need.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: HSV value

Postby cdh473 » Sat Sep 26, 2009 3:30 am

NONONONONO!!!!!
IT'S NOT RGB!!!!! ALGODOO/PHUN HAS AN ALPHA VALUE, DON'T FORGET IT!
It's RGBA ;)
Please excuse my posts. I am extremely stupid.
User avatar
cdh473
 
Posts: 816
Joined: Tue Sep 01, 2009 12:37 am
Location: Yes


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 1 guest