From 27f8778187b307276debce6c3f45747a7af7418e Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sun, 22 Oct 2023 15:23:55 +0200 Subject: [PATCH] Add docblock --- src/Drivers/Imagick/Traits/CanHandleColors.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Drivers/Imagick/Traits/CanHandleColors.php b/src/Drivers/Imagick/Traits/CanHandleColors.php index 7d9fab1bb..96017ced5 100644 --- a/src/Drivers/Imagick/Traits/CanHandleColors.php +++ b/src/Drivers/Imagick/Traits/CanHandleColors.php @@ -46,9 +46,15 @@ public function pixelToColor(ImagickPixel $pixel, ColorspaceInterface $colorspac } /** - * Transforms given color to the corresponding ImagickPixel + * Transforms given color to the corresponding ImagickPixel in given colorspace + * + * Colorspaces of color might be different from given colorspace. You might + * have a CMYK Image but give an rgb color to a method. This makes sure + * that the color is converted to the given colorspace. In this case + * the image colorspace which is passed to this method. * * @param ColorInterface $color + * @param ColorspceInterface $colorspace * @return ImagickPixel */ public function colorToPixel(ColorInterface $color, ColorspaceInterface $colorspace): ImagickPixel