Same name and namespace in other branches
- 3.0.x src/ColorInterface.php \Drupal\color_field\ColorInterface::toHex()
Get the color as a hex instance.
Return value
\Drupal\color_field\ColorHex The color as a hex instance.
5 methods override ColorInterface::toHex()
- ColorCMY::toHex in src/
ColorCMY.php - Get the color as a hex instance.
- ColorCMYK::toHex in src/
ColorCMYK.php - Get the color as a hex instance.
- ColorHex::toHex in src/
ColorHex.php - Get the color as a hex instance.
- ColorHSL::toHex in src/
ColorHSL.php - Get the color as a hex instance.
- ColorRGB::toHex in src/
ColorRGB.php - Get the color as a hex instance.
File
-
src/
ColorInterface.php, line 24
Class
- ColorInterface
- Defines a common interface for color classes.
Namespace
Drupal\color_fieldCode
public function toHex();