Same name and namespace in other branches
- 3.0.x src/ColorCMY.php \Drupal\color_field\ColorCMY::toHex()
Get the color as a hex instance.
Return value
\Drupal\color_field\ColorHex The color as a hex instance.
Overrides ColorInterface::toHex
File
-
src/
ColorCMY.php, line 96
Class
- ColorCMY
- ColorCMY represents the CMY color format.
Namespace
Drupal\color_fieldCode
public function toHex() {
return $this->toRgb()
->toHex();
}