You are here

public function Color::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 ColorInterface::getHexadecimal

File

src/Entity/Color.php, line 64

Class

Color
The Color API Color entity definition.

Namespace

Drupal\colorapi\Entity

Code

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