* @copyright (c) 2007-2008 Digital Base BVBA <{@link mailto:info@digitalbase.eu info@digitalbase.eu}> * @package dbFusionChart */ /** * counter to help us cyclically rotate through the array of colors. */ $FC_ColorCounter=0; /** * @var array contains the hex code of colors (WITHOUT #) */ $arr_FCColors = array("1941A5", //Dark Blue "AFD8F8", "F6BD0F", "8BBA00", "A66EDD", "F984A1", "CCCC00", //Chrome Yellow+Green? "999999", //Grey "0099CC", //Blue Shade "FF0000", //Bright Red "006F00", //Dark Green "0099FF", //Blue (Light) "FF66CC", //Dark Pink "669966", //Dirty green "7C7CB4", //Violet shade of blue "FF9933", //Orange "9900FF", //Violet "99FFCC", //Blue+Green Light "CCCCFF", //Light violet "669900", //Shade of green ); /** * Uses cyclic iteration to return a color from a given index. * The index value is maintained in FC_ColorCounter * * @return string hex color code (without #) from arr_FCColors array */ function getFCColor() { //accessing the global variables global $FC_ColorCounter; global $arr_FCColors; //Update index $FC_ColorCounter++; //Return color return($arr_FCColors[$FC_ColorCounter % count($arr_FCColors)]); }