File
-
src/
ColorCMY.php, line 116
Class
- ColorCMY
- ColorCMY represents the CMY color format.
Namespace
Drupal\color_fieldCode
public function toCmyk() : ColorCMYK {
$key = min($this->getCyan(), $this->getMagenta(), $this->getYellow());
$cyan = $this->cyan * (1 - $key) + $key;
$magenta = $this->magenta * (1 - $key) + $key;
$yellow = $this->yellow * (1 - $key) + $key;
return new ColorCMYK($cyan, $magenta, $yellow, $key, $this->getOpacity());
}