You are here

public function ColorCMYK::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.

Overrides ColorInterface::toHex

File

src/ColorCMYK.php, line 116

Class

ColorCMYK
ColorCMYK represents the CMYK color format.

Namespace

Drupal\color_field

Code

public function toHex() {
  return $this
    ->toRgb()
    ->toHex();
}