Basejumper.com - archive

The Hangout

Shortcut
Dorkzone Colorizer
Took a whole 10 minutes. The code is simple (C#):


Code
string text = this.textBox.Text; 
StringBuilder result = new StringBuilder();
Random random = new Random();

foreach (char c in text.ToCharArray())
{
if (char.IsWhiteSpace(c))
result.Append(c);
else
{
int r = random.Next(256);
int g = random.Next(256);
int b = random.Next(256);

result.AppendFormat("[#{0:X2}{1:X2}{2:X2}]{3}[/REMOVETHIS#]", r, g, b, c);
}
}

Clipboard.SetText(result.ToString());


Enjoy. Laugh

P.S. Remove "REMOVETHIS" if you were to actually use this code, without it the closing tag [ / # ] would disappear in the post.
DorkzoneColorizer.exe
Shortcut
Re: [yuri_base] Dorkzone Colorizer
This is rather cool but leaving it exactly as coded is a little hard to read.

It's worth experimenting with it.

Nice job.
Shortcut
Re: [hookitt] Dorkzone Colorizer
This is easy to fix. Just lower the upper limit of random R, G, B values. New exe is attached.


Code
int r = random.Next(200); 
int g = random.Next(200);
int b = random.Next(200);

DorkzoneColorizer.exe
Shortcut
Re: [yuri_base] Dorkzone Colorizer
And this is a special version for GreenMachine. AngelicLaughCoolTongueBlushSlyWink
DorkzoneGreenizer.exe
Shortcut
Re: [yuri_base] Dorkzone Colorizer
simple code for the rainbow coalition! Laugh
Shortcut
Re: [yuri_base] Dorkzone Colorizer
Thank You Sir.
Shortcut
Re: [GreenMachine] Dorkzone Colorizer
You're welcome. Anyone with too much time in their hands can take the attached Visual Studio 2008 project to new level of madness.
DorkzoneColorizer.zip
Shortcut
Re: [hookitt] Dorkzone Colorizer
hookitt wrote:
This is rather cool but leaving it exactly as coded is a little hard to read.

It's worth experimenting with it.

Nice job.

yeah,,, reminds me of the PRIDE flag,, as in...