Armagetron Color Fade Script (:

General Stuff about Armagetron, That doesn't belong anywhere else...
Post Reply
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Armagetron Color Fade Script (:

Post by Light »

Made a small script that works with another site for creating color fades in AA if anyone is interested. Just thought I'd be nice and share it.

You need Firefox or Chrome.
If you use Firefox, then you need Greasemonkey.

Here's the source. Save it to a file names Light_Text_Fade.user.js and drag it on to your browser. It should prompt installation.

Code: Select all

// ==UserScript==
// @name             Light Text Fade
// @version          1.0
// @namespace        Light
// @homepage         http://lightron.no-ip.org
// @description      Creates Text Fade Colors
// @include          http://patorjk.com/text-color-fader/*
// ==/UserScript==

// Hide About
window.document.querySelectorAll("#bottomContainer .controlsStyle")[0].style.display = "none";

// Convert To Tron Code When Clicked
window.document.querySelector("#htmlCode").addEventListener("click", function()
{
	var output = "";
	var regexp = /<font color=\"#(\w\w\w\w\w\w)\">([^<\/])<\/font>/g;
	
	for (var i = 0, n = this.value.match(regexp).length; i < n; i++)
	{
		var match = regexp.exec(this.value);
		output += "0x" + match[1].toLowerCase() + match[2];
	}
	
	this.value = output;
}, false);
Go to http://patorjk.com/text-color-fader/
Create a text fade, hit generate, and click the code. It will convert automatically.

Enjoy (:
Post Reply