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 dans src/ColorCMY.php
Get the color as a hex instance.
ColorHex::toHex dans src/ColorHex.php
Get the color as a hex instance.
ColorHSL::toHex dans src/ColorHSL.php
Get the color as a hex instance.
ColorRGB::toHex dans src/ColorRGB.php
Get the color as a hex instance.

Fichier

src/ColorInterface.php, line 26

Classe

ColorInterface
Defines a common interface for color classes.

Namespace

Drupal\color_field

Code

public function toHex() : ColorHex;