Same name in other branches
  1. 8.x-2.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.

4 methods override ColorInterface::toHex()
ColorCMY::toHex in src/ColorCMY.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 26

Class

ColorInterface
Defines a common interface for color classes.

Namespace

Drupal\color_field

Code

public function toHex() : ColorHex;