コード例 #1
0
 public function formatColor(\OttawaDeveloper\Tools\ColorAnalyzer\Color $color)
 {
     $rgbProcessor = new HexProcessor();
     $hexString = strtolower($rgbProcessor->formatColor($color));
     if (in_array($hexString, self::$colorKeywords)) {
         $values = array_flip(self::$colorKeywords);
         return $values[$hexString];
     }
     return NULL;
 }