Same name and namespace in other branches
- 8.x-2.x src/ColorRGB.php \Drupal\color_field\ColorRGB::toHex() 1 commentaire
Overrides ColorInterface::toHex
Fichier
-
src/
ColorRGB.php, line 102
Classe
- ColorRGB
- RGB represents the RGB color format.
Namespace
Drupal\color_fieldCode
public function toHex() : ColorHex {
return new ColorHex($this->intToColorHex($this->getRed()) . $this->intToColorHex($this->getGreen()) . $this->intToColorHex($this->getBlue()), $this->intToColorHex($this->getOpacity() * 255));
}