PHP - Convert CMYK colour values to RGBA
问题 I need to convert CMYK values to RGBA values, but have yet to stumble upon an algorithm for this that just works. I already have the RGBA to CMYK via the following: Convert RGBA to RGB Convert RGB to CMYK Below are the algorithms I'm using for the above two bullet points: RGBA to RGB return substr($rgba, 0, -2); ... what? Nothing wrong with that! :D RGB to CMYK $c = 255 - $r; $m = 255 - $g; $y = 255 - $b; $b = min($c, $m, $y); $c = round(($c - $b) / (255 - $b)); $m = round(($m - $b) / (255 -