You are here

public function ColorData::getRed in Color API 8

Retrieve 'Red' value of the Color data object RGB property.

Return value

array The value for the RGB "red". An integer between 0 and 255.

Overrides ColorInterface::getRed

File

src/Plugin/DataType/ColorData.php, line 80

Class

ColorData
Provides the Color Typed Data type.

Namespace

Drupal\colorapi\Plugin\DataType

Code

public function getRed() {
  return $this
    ->get('rgb')
    ->getRed();
}