From 336c9c63da14203aa02d2e15d98f6c9146730d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20L=C3=BCcke?= Date: Wed, 3 Mar 2021 12:53:36 +0100 Subject: [PATCH] Die Leuchtdichte wird richtig erkannt. --- .../CyanMagentaYellowKeyToHueSaturationValue.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Transformer/Utilities/CyanMagentaYellowKeyToHueSaturationValue.php b/src/Transformer/Utilities/CyanMagentaYellowKeyToHueSaturationValue.php index 33ae3d1..aec5071 100644 --- a/src/Transformer/Utilities/CyanMagentaYellowKeyToHueSaturationValue.php +++ b/src/Transformer/Utilities/CyanMagentaYellowKeyToHueSaturationValue.php @@ -55,8 +55,7 @@ class CyanMagentaYellowKeyToHueSaturationValue $this->minCmyProperty = min($this->cyan, $this->magenta, $this->yellow); $this->hue = round($this->buildHueAmount(), 3); - $this->hue = $this->buildHueAmount(); - $this->saturation = $this->buildSaturationAmount(); + $this->saturation = $this->maxCmyProperty; $this->value = 1 - $this->key; } @@ -83,15 +82,6 @@ class CyanMagentaYellowKeyToHueSaturationValue }; } - protected function buildSaturationAmount(): float - { - if ($this->maxCmyProperty === 0.0) { - return 0.0; - } - - return ($this->maxCmyProperty - $this->minCmyProperty) / $this->maxCmyProperty; - } - /** * @param string $property : Name der CMYK-Eigenschaft * @return float