You are here

public function ColorItem::getColorName in Color API 8

Retrieve the human-readable name of the color.

Return value

string The human-readable name of the color.

Overrides ColorItemInterface::getColorName

File

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

Class

ColorItem
Provides the Color field.

Namespace

Drupal\colorapi\Plugin\Field\FieldType

Code

public function getColorName() {
  return $this
    ->get('name')
    ->getValue();
}