Same name and namespace in other branches
- 8.x-2.x src/ColorCMYK.php \Drupal\color_field\ColorCMYK::toCmy() 1 comment
File
-
src/
ColorCMYK.php, line 58
Class
- ColorCMYK
- ColorCMYK represents the CMYK color format.
Namespace
Drupal\color_fieldCode
public function toCmy() : ColorCMY {
$cyan = $this->cyan * (1 - $this->key) + $this->key;
$magenta = $this->magenta * (1 - $this->key) + $this->key;
$yellow = $this->yellow * (1 - $this->key) + $this->key;
return new ColorCMY($cyan, $magenta, $yellow, $this->getOpacity());
}