Skip to content

Instantly share code, notes, and snippets.

// written by quaker66:
//! Let's convert a Cube string colorification into proper HTML spans
//! Accepts just one argument, returns the html string.
function convert_cube_string(str) {
var tmp = str; // some temp we'll return later
var found = false; // have we found some colorz??!
var cube_colors = [ // array of colors with element number corresponding to sauer type
'40FF80', // 0 = green
'60A0FF', // 1 = blue