My algorithm isn't systematic. As in, it doesn't conform to a standard "rainbow" algorithm like what you're describing. I wasn't trying to accomplish that. After some thought, I figured I'd try that one as well but it wasn't my objective.Define a function or procedure that takes as input a string that you will convert to arbitrary "rainbow" BBCode
The criteria I defined was to create something to arbitrarily generate rainbow BBCode. Which by definition is something that consists of its 7 colors.
Artificial's solution was an example of the algorithm you're referring to.
Results 1 to 18 of 18
Thread: Suggestions
Hybrid View
- 15 Aug. 2012 10:06pm #1
Last edited by The Unintelligible; 15 Aug. 2012 at 10:09pm.
- 16 Aug. 2012 07:10pm #2
Because it's the best algorithm!
Either way, I'd use HSL.
Just pick seven random hues, then increment from one to the other by (color2 - color1) / (total_string_characters / total_colors_7)
I think that's right anywho, on the most layman of examples that is obviously not optimized for for loop use yet.
- 16 Aug. 2012 07:36pm #3
I agree that it looks better. I realize that. I wasn't trying to accomplish that at all. Like I said, on hindsight I realized I should have done it that way because when I first created mine my initial thoughts were "wow this is so hideous in contrast to this."
Thanks, but you also don't need to describe the algorithm to me. It seems simple enough. You're creating an iterator based on this formula.
Rainbow Color Algorithm? - Yahoo! Answers
I don't intend on trying this anytime soon.