Skip to content

Commit

Permalink
Add docblock
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed Oct 22, 2023
1 parent eb30ab9 commit 27f8778
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Drivers/Imagick/Traits/CanHandleColors.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 27f8778

Please sign in to comment.