=== added file 'Converting RGB Colors to HTML Colors.php' --- Converting RGB Colors to HTML Colors.php 1970-01-01 00:00:00 +0000 +++ Converting RGB Colors to HTML Colors.php 2012-09-17 03:56:35 +0000 @@ -0,0 +1,120 @@ + + + Armagetron Advanced - Convert arma color codes to HTML + + + + 0)) // if the color code was found beyond the 0 mark, then + { + $new_string .= substr($source_string, $new_strPos, (($strPos-1) - $new_strPos)); // read in the first bit + $chars += (($strPos-1) - $new_strPos); + } + + $new_strPos = $strPos + 7; // set the new length to get + $strPos = strpos($source_string, "0x", $strPos); // get the next color code's position + if ($strPos == false) // if there is none + { + $strPos = strlen($source_string); // make the strpos the length of the entire source string + + // put the current color and the extra into $new_string + $new_string .= ''.substr($source_string, $new_strPos, ($strPos - $new_strPos)).''; + $chars += ($strPos - $new_strPos); + $strPos = false; //now turn this back to it's original value, false + } + else // if there is another + { + // put the current color and the extra into $new_string + $new_string .= ''.substr($source_string, $new_strPos, ($strPos - $new_strPos)).''; + $chars += ($strPos - $new_strPos); + } + $firstTime = false; + } + else // if this is not the first time, most of the things that had taken place will also take place here. No confusion necessary. + { + $colorCode = substr($source_string, $strPos, 8); + $colorCode = str_replace("0x", "#", $colorCode); + + if (($new_strPos == 0) && ($strPos > 0)) + { + $new_string .= substr($source_string, $new_strPos, ($strPos - $new_strPos)); + $chars += ($strPos - $new_strPos); + } + + $new_strPos = $strPos + 8; + $strPos = strpos($source_string, "0x", $strPos+1); + if ($strPos == false) + { + $strPos = strlen($source_string); + $new_string .= ''.substr($source_string, $new_strPos, ($strPos - $new_strPos)).''; + $chars += ($strPos - $new_strPos); + $strPos = false; + } + else + { + $new_string .= ''.substr($source_string, $new_strPos, ($strPos - $new_strPos)).''; + $chars += ($strPos - $new_strPos); + } + } + } + // now write the new string to the browser page +?> +
+

+ +
+
+ + Enter your color coded arma string into the box and click "Convert" +
+ + + +
+
+ + + \ No newline at end of file === added file 'changing_colors.css' --- changing_colors.css 1970-01-01 00:00:00 +0000 +++ changing_colors.css 2012-09-17 03:56:35 +0000 @@ -0,0 +1,18 @@ +body +{ + background-color: transparent; +} + +.text_header +{ + background-color: #000000; + width: 50%; + height: 10%; + font-size: 24px; + font-family: lucida console; +} + +.text_box +{ + font-family: lucida console; +} \ No newline at end of file