Same name and namespace in other branches
- 8.x-2.x src/ColorCMY.php \Drupal\color_field\ColorCMY::toString() 1 commentaire
A string representation of this color in the current format.
Paramètres
bool $opacity: Whether to display the opacity.
Return value
string The color in format: #RRGGBB.
Overrides ColorInterface::toString
Fichier
-
src/
ColorCMY.php, line 91
Classe
- ColorCMY
- ColorCMY represents the CMY color format.
Namespace
Drupal\color_fieldCode
public function toString(bool $opacity = TRUE) : string {
return $this->toHex()
->toString($opacity);
}