Get the color as a hex instance.
Return value
\Drupal\color_field\ColorHex The color as a hex instance.
Overrides ColorInterface::toHex
Fichier
-
src/
ColorHSL.php, line 116
Classe
- ColorHSL
- RGB represents the RGB color format.
Namespace
Drupal\color_fieldCode
public function toHex() : ColorHex {
return $this->toRGB()
->toHex();
}