Pages: [1]   Go Down
Author Topic: Algorithm Idea needed: Do not cycle the color, but modify it a bit  (Read 389 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there,

I am looking for an good algorithm to modify colors a bit, alternating them around an base "personality" / color, so that the installation looks more dynamic and vivid.

Say, I got some orange like color, i.e. 255 / 128 / 0 - then it would be awesome if that algorithm code fade it a bit into redish and yellowish, but always returning and working around orange.
As I got multiple stations with different base colors, I can't write an own algorithm for each station, and I don't want to hardcode everything, so no "hard coded" sequences like fade to that, and then that.
Is there any possibilty to calculate that on the fly and change colors, so that it looks more vivid?


Thanks a lot!
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 146
Posts: 5536
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there,

I am looking for an good algorithm to modify colors a bit, alternating them around an base "personality" / color, so that the installation looks more dynamic and vivid.

Say, I got some orange like color, i.e. 255 / 128 / 0 - then it would be awesome if that algorithm code fade it a bit into redish and yellowish, but always returning and working around orange.
As I got multiple stations with different base colors, I can't write an own algorithm for each station, and I don't want to hardcode everything, so no "hard coded" sequences like fade to that, and then that.
Is there any possibilty to calculate that on the fly and change colors, so that it looks more vivid?


Thanks a lot!

Google for "HSV color model". It allows you to stuff like that.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Google for "HSV color model". It allows you to stuff like that.

Excellent! This Blog Entry ( http://eduardofv.com/read_post/179-Arduino-RGB-LED-HSV-Color-Wheel- ) got me up and running in no time.
By alternating the Hue Value and the Saturation / "Brightness", I can achieve the needed effects.
Thanks a lot!
Logged

Pages: [1]   Go Up
Jump to: