blend function¶
- colourettu.blend(colour_1, colour_2)[source]¶
Takes two
Colour
s and returns the ‘average’ Colour.- Parameters
colour_1 (colourettu.Colour) – a colour
colour_2 (colourettu.Colour) – a second colour
Note
Uses the formula:
It is shown here for the red channel, but applied independently to each of the red, green, and blue channels. The reason for doing it this way (rather than using a simple average) is that the brightness of the colours is stored in a logarithmic scale, rather than a linear one.
For a fuller explanation, Minute Physics has released a great YouTube video.
See also