Page 1 of 2
Rainbows!
Posted: Fri Aug 26, 2005 7:05 am
by onion2k
Thisistextinaprettyrainbowstylee.Aww..sopweetty!
Code: Select all
<?php
$string = "This is text in a pretty rainbow stylee. Aww.. so pweetty!";
$steps = strlen($string);
$r = 255; $g = 0; $b = 255;
$step = 255 / ceil($steps/5);
for ($x=0;$x<$steps;$x++) {
if ($x%ceil($steps/5) == 0) { $s++; }
switch ($s) {
case 1: $b -= $step; break;
case 2: $g += $step; break;
case 3: $r -= $step; break;
case 4: $b += $step; break;
case 5: $g -= $step; break;
}
echo "[color=#".sprintf("%02X%02X%02X",$r,$g,$b)."]".$string{$x}."[/color]";
}
?>
Don't ask why I wrote this..
Posted: Fri Aug 26, 2005 7:13 am
by Ree
Why did you write this?
Posted: Fri Aug 26, 2005 7:20 am
by Chris Corbyn
Ree wrote:Why did you write this?
Because it's cool and I'm guessing he was a lil' bit bored
I do funky stuff like that when I get bored... sometimes it inspires me to carry it further

Posted: Fri Aug 26, 2005 7:29 am
by feyd
onion needs a new project! (or a vacation)

Posted: Fri Aug 26, 2005 8:01 am
by onion2k
Ree wrote:Why did you write this?
I said don't ask. Now I have to kill you.
Actually, it was because someone on a different forum posted to say people posting in different colours annoyed him.
EDIT: And, rather brilliantly, that post was the one that carried me over into Master status.
Posted: Fri Aug 26, 2005 8:46 am
by Roja
onion2k wrote:Actually, it was because someone on a different forum posted to say people posting in different colours annoyed him.
That person is not alone.
Now I'm tempted to write a preference addon for PHPBB that will allow users to ignore color changes..
Its an arms race of annoyance, I tell ya.
Posted: Fri Aug 26, 2005 10:05 am
by JayBird
Onion2k, once again you amaze me with your brilliant experimentations
Keep it up

Posted: Fri Aug 26, 2005 11:13 am
by The Monkey
Coolness.
Posted: Fri Aug 26, 2005 11:17 am
by nielsene
While I don't mind the colorful text, the markup is highly offensive... look... multipled the string length by about 35.... ick... (Cool effect though

)
Code: Select all
<span style="color: #FF00E9">T</span><span style="color: #FF00D4">h</span><span style="color: #FF00BF">i</span><span style="color: #FF00AA">s</span><span style="color: #FF0094"> </span><span style="color: #FF007F">i</span><span style="color: #FF006A">s</span><span style="color: #FF0055"> </span><span style="color: #FF003F">t</span><span style="color: #FF002A">e</span><span style="color: #FF0015">x</span><span style="color: #FF0000">t</span><span style="color: #FF1500"> </span><span style="color: #FF2A00">i</span><span style="color: #FF3F00">n</span><span style="color: #FF5500"> </span><span style="color: #FF6A00">a</span><span style="color: #FF7F00"> </span><span style="color: #FF9400">p</span><span style="color: #FFAA00">r</span><span style="color: #FFBF00">e</span><span style="color: #FFD400">t</span><span style="color: #FFE900">t</span><span style="color: #FFFF00">y</span><span style="color: #E9FF00"> </span><span style="color: #D4FF00">r</span><span style="color: #BFFF00">a</span><span style="color: #AAFF00">i</span><span style="color: #94FF00">n</span><span style="color: #7FFF00">b</span><span style="color: #6AFF00">o</span><span style="color: #55FF00">w</span><span style="color: #3FFF00"> </span><span style="color: #2AFF00">s</span><span style="color: #15FF00">t</span><span style="color: #00FF00">y</span><span style="color: #00FF15">l</span><span style="color: #00FF2A">e</span><span style="color: #00FF3F">e</span><span style="color: #00FF55">.</span><span style="color: #00FF6A"> </span><span style="color: #00FF7F">A</span><span style="color: #00FF94">w</span><span style="color: #00FFAA">w</span><span style="color: #00FFBF">.</span><span style="color: #00FFD4">.</span><span style="color: #00FFE9"> </span><span style="color: #00FFFF">s</span><span style="color: #00E9FF">o</span><span style="color: #00D4FF"> </span><span style="color: #00BFFF">p</span><span style="color: #00AAFF">w</span><span style="color: #0094FF">e</span><span style="color: #007FFF">e</span><span style="color: #006AFF">t</span><span style="color: #0055FF">t</span><span style="color: #003FFF">y</span><span style="color: #002AFF">!</span>
Posted: Fri Aug 26, 2005 12:57 pm
by wwwapu
It would be perfect if you added a feature that made background like rainbow too. Possibly with many tiny divs and text floating on top of them?
How annoying would that be?
Posted: Fri Sep 30, 2005 10:45 am
by pilau
wwwapu wrote:It would be perfect if you added a feature that made background like rainbow too. Possibly with many tiny divs and text floating on top of them?
How annoying would that be?
Very much annoying!
Posted: Fri Sep 30, 2005 11:00 am
by John Cartwright
Can't post DIVs though

Posted: Mon Oct 03, 2005 4:53 am
by Afterlife(69)
Nice

heres a lil UI for it.
Code: Select all
<center>
<?php
if(!empty($HTTP_POST_VARS['textbox']))
{
$string = $HTTP_POST_VARS['textbox'];
$steps = strlen($string);
$r = 255; $g = 0; $b = 255;
$step = 255 / ceil($steps/5);
echo '<textarea rows="15" name="output" cols="45" style="width:100%">';
for ($x=0;$x<$steps;$x++)
{
if ($x%ceil($steps/5) == 0)
{
$s++;
}
switch ($s)
{
case 1: $b -= $step; break;
case 2: $g += $step; break;
case 3: $r -= $step; break;
case 4: $b += $step; break;
case 5: $g -= $step; break;
}
echo "[color=#".sprintf("%02X%02X%02X",$r,$g,$b)."]".$string{$x}."[/color]";
}
echo '</textarea><br />';
}
?>
<form method="POST" action="<?php echo basename(__FILE__); ?>">
<textarea rows="15" name="textbox" cols="45"></textarea><br />
<input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
</center>
Posted: Wed Oct 05, 2005 4:18 pm
by Luke
Wow...thatisannoying.
Posted: Sat Nov 05, 2005 7:10 pm
by Dm7
Wowthat'ssobeautiful...:P
LOL I love that code snippet. XD I don't know how you do that... I'm curious where/how you learned about that?
