yellow+blue=green

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
vandinem
Posts: 1
Joined: 2018-09-19T08:08:30-07:00
Authentication code: 1152

yellow+blue=green

Post by vandinem »

I would like to merge images so that pixels represent the RGB result of combining the overlays. In the simplest case, a yellow pixel + a blue pixel would result in a green pixel. Does ImageMagick support a mechanism to do something like this?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: yellow+blue=green

Post by snibgo »

"yellow+cyan->green" occurs in subtractive mixing, like paints or colour printers. So do the work in CMY colorspace, eg:

Code: Select all

magick -size 200x200 xc:Yellow xc:cyan -colorspace CMY -compose Add -composite -colorspace sRGB x.png
snibgo's IM pages: im.snibgo.com
Post Reply