in reply to HTML text toner

I do something like that over here, which was, in fact, the way I generated my sig. I wrote it years ago as a quick hack to help a friend out who was painstakingly trying to do something like it by hand in order to impress a girl he met via an HTML-aware guestbook. The code is too embarrassing to be let out into the wild.

Note that my version keeps going round and round, but never actually gets back to the starting point, thereby insuring a steady stream of different hues.


In reply to Dog and Pony, yes, I'm rotating the channels independently. I use the output of sin(), scaling the range -1..1 to 0..255. When the sine output is positive and the difference from the previous value is negative, then I'm at the top o' the wave, so to speak, so I choose another period (13 chars, 17 chars...).

I use prime numbers to ensure that the three frequencies are all relatively prime to each other... although I'm not sure that that is important, just that each channel uses a different period, even if they are multiples of each other.


print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'

Replies are listed 'Best First'.
Re: Re: HTML text toner
by Dog and Pony (Priest) on Feb 18, 2002 at 10:34 UTC
    So I see :) I guess you are rotating R,G,B independently with some random numbers? It gives quite a nice effect, I agree.

    My reason was not unsimilar, although I started out with the program TextTone. Some guys in a HTML-enabled forum started the "color wars", with <font> tags, and I thought I'd show them what nukes look like. Silly, sure, but it seemed like a great idea at the moment. Lots of things do. *Grin*