public function ColorItem::getRed in Color API 8
Retrieve 'Red' value of the Color Field Color data object RGB property.
Return value
array The value for the RGB "red". An integer between 0 and 255.
Overrides ColorItemInterface::getRed
File
- src/
Plugin/ Field/ FieldType/ ColorItem.php, line 161
Class
- ColorItem
- Provides the Color field.
Namespace
Drupal\colorapi\Plugin\Field\FieldTypeCode
public function getRed() {
return $this
->get('color')
->getRed();
}