Miniwindows in MUSHclient - Colour limit blending modes
Written by Nick Gammon - July 2008. Updated September 2010.
On this page:
- Green limited by red
- Green limited by blue
- Green limited by average of red and blue
- Blue limited by red
- Blue limited by green
- Blue limited by average of red and green
- Red limited by green
- Red limited by blue
- Red limited by average of green and blue
See also:
- Introduction
- Creating miniwindows
- Drawing shapes
- Drawing images
- Drawing text
- Hotspots
- Helpful graphics functions
Colour blending modes
See Blending images for a description of how to use the image blending function. On this page are illustrated the "colour limit" modes.
| Base image (in miniwindow) | Blend image (mentioned in WindowBlendImage) |
|---|---|
![]() |
![]() |
The modes on this page operate over all three channels (red, green and blue) rather than individual pixels.
Green limited by red mode (42)
In each pixel the green value in the blend is compared to the red value in the base image. If the amount of green exceeds the amount of red, it is clipped to the red amount.

Green limited by blue mode (43)
In each pixel the green value in the blend is compared to the blue value in the base image. If the amount of green exceeds the amount of blue, it is clipped to the blue amount.

Green limited by average of red and blue mode (44)
In each pixel the green value in the blend is compared to the average of the red and blue value in the base image. If the amount of green exceeds that average, it is clipped to the average.

Blue limited by red mode (45)
In each pixel the blue value in the blend is compared to the red value in the base image. If the amount of blue exceeds the amount of red, it is clipped to the red amount.

Blue limited by green mode (46)
In each pixel the blue value in the blend is compared to the green value in the base image. If the amount of blue exceeds the amount of green, it is clipped to the green amount.

Blue limited by average of red and green mode (47)
In each pixel the green value in the blend is compared to the average of the red and green value in the base image. If the amount of blue exceeds that average, it is clipped to the average.

Red limited by green mode (48)
In each pixel the red value in the blend is compared to the green value in the base image. If the amount of red exceeds the amount of green, it is clipped to the green amount.

Red limited by blue mode (49)
In each pixel the red value in the blend is compared to the blue value in the base image. If the amount of red exceeds the amount of blue, it is clipped to the blue amount.

Red limited by average of green and blue mode (50)
In each pixel the red value in the blend is compared to the average of the blue and green value in the base image. If the amount of red exceeds that average, it is clipped to the average.

Examples on this page
The examples on this page are taken from Fields of gold... by Spiralz, and Thanks to solea by jam343. These are licensed for royalty-free use under the Attribution 2.5 Generic License. They were obtained from the web site http://www.everystockphoto.com/.
Some ideas and descriptions were adapated from the Pegtop.net Blend Modes article.
Summary of the pages with the various mode groups:
- Normal, average, dissolve
- Darkening modes
- Lightening modes
- Soft/hard light modes
- Difference/logical modes
- Glow modes
- Colour copying
- Colour limiting
- Channel modes
- HSL modes
Other pages about miniwindows
- Introduction
- Creating miniwindows
- Drawing shapes
- Drawing images
- Drawing text
- Hotspots
- Helpful graphics functions

