public function Color::getBlue in Color API 8
Retrieve 'Blue' 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 ColorInterface::getBlue
File
- src/
Entity/ Color.php, line 105
Class
- Color
- The Color API Color entity definition.
Namespace
Drupal\colorapi\EntityCode
public function getBlue() {
if ($color = $this
->get('color')) {
return \Drupal::service('colorapi.service')
->hexToRgb($color, 'blue');
}
}