code: protected function shortenHexColor($color)
  	{
  		if ($color[0] == $color[1] && $color[2] == $color[3] && $color[4] == $color[5])
  		{
  			return $color[0] . $color[2] . $color[4];
  		}
  
  		return $color;
  	}
docs: Try to shorten a hex color
  
  @param string $color
  
  @return string