public function ColorInterface::toHex in Color Field 8.2
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();