Subtractive color/colour mixing (yellow+blue=green)

Asked by Christoph Ra on 2017-01-09

It's a common feature of graphic software that a blend between two colours doesn't take into account the "gamma" used for storing these colors. As a result, overlaying two partially transparent blues and yellows doesn't produce green, but a darker shade of brown. This is also the case in Inkscape. Is there a way in Inkscape to do it correctly? Neither of the new layer blend modes (awesome as they are) in 0.92 does this.

Question information

English Edit question
Inkscape Edit question
No assignee Edit question
Solved by:
Christoph Ra
Last query:
Last reply:

This question was reopened

Christoph Ra (chraab) said : #2

Hey Aman J, you made a mistake there. (Assuming you didn't mean to mash your keyboard and close a question.)

Bryce Harrington (bryce) said : #3

anm123 appears to have been a spam account.

Hachmann (marenhachmann) said : #4

Hi Christoph,

while I'm quite sure it should be possible to achieve this with filtering, I've got no idea how to go about this.

At, there are a couple of users who are deeply invested into working with filters, I bet they'll be able to answer this (with a filter).


Bryce Harrington (bryce) said : #6

another spam closure

su_v (suv-lp) said : #7

Example documented here:

Open the file embedded on that page [ ] in a recent Inkscape version (>= 0.91) ...

Christoph Ra (chraab) said : #8

Thank you su_v! This seems to be indeed the solution, though it might take me a while to figure out how to reproduce this for my purpose, a linear gradient...

su_v (suv-lp) said : #9

@Christoph - please share any results if you manage to achieve this magic via filter effects ;-)

[ Inkscape like all major web browsers only supports interpolation in sRGB for gradients, Batik OTOH supports both sRGB and linearRGB: ]

In case the focus is on color interpolation in linearRGB more than on actual gradient paint servers:
I could offer modified versions of Inkscape's Interpolate extensions (which can interpolate colors in object styles in sRGB, linearRGB, HSV; Cie Lab/Luv, LCH), as showcased in this (older) screencast:

The extensions are part of a larger set maintained here:
Available downloads: