You are here

public function ColorapiService::isValidHexadecimalColorString in Color API 8

File

src/Service/ColorapiService.php, line 15

Class

ColorapiService
Service class for the Color API module.

Namespace

Drupal\colorapi\Service

Code

public function isValidHexadecimalColorString($string) {
  return preg_match(HexColorInterface::HEXADECIMAL_COLOR_REGEX, $string);
}