Same name and namespace in other branches
- 3.0.x src/ColorCMY.php \Drupal\color_field\ColorCMY::toRgb()
Overrides ColorInterface::toRgb
File
-
src/
ColorCMY.php, line 103
Class
- ColorCMY
- ColorCMY represents the CMY color format.
Namespace
Drupal\color_fieldCode
public function toRgb() {
$red = (1 - $this->cyan) * 255;
$green = (1 - $this->magenta) * 255;
$blue = (1 - $this->yellow) * 255;
return new ColorRGB($red, $green, $blue, $this->getOpacity());
}