You are here

public function ColorItem::getHexadecimal in Color API 8

Retrieve the hexadecimal color string representation of the color.

Return value

string The hexadecimal string representation of the color.

Overrides ColorItemInterface::getHexadecimal

1 call to ColorItem::getHexadecimal()
ColorItem::isEmpty in src/Plugin/Field/FieldType/ColorItem.php
Determines whether the data structure is empty.

File

src/Plugin/Field/FieldType/ColorItem.php, line 133

Class

ColorItem
Provides the Color field.

Namespace

Drupal\colorapi\Plugin\Field\FieldType

Code

public function getHexadecimal() {
  return $this
    ->get('color')
    ->getHexadecimal();
}