protected function getRGBFromRange($r, $g, $b, $range) {
		#	get randomized rgb values on a specific range from a agiven value

		if (!$range) {
			return array($r, $g, $b);
		}

		$range = round($range / 2);
		$color = array();

		# red
		$min = $r - $range;
		$max = $r + $range;

		if ($min < 0) {
			$min = 0;
		}

		if ($max > 255) {
			$max = 255;
		}

		$color['r'] = $color[0] = rand($min, $max);

		# Green
		$min = $g - $range;
		$max = $g + $range;

		if ($min < 0) {
			$min = 0;
		}

		if ($max > 255) {
			$max = 255;
		}

		$color['g'] = $color[1] = rand($min, $max);

		# blue
		$min = $b - $range;
		$max = $b + $range;

		if ($min < 0) {
			$min = 0;
		}

		if ($max > 255) {
			$max = 255;
		}

		$color['b'] = $color[2] = rand($min, $max);

		return $color;
	}