   pegtop.net  >  delphi section  >  articles  >  blend modes  >  burn modes delphi section  articles  blend modes  introduction  normal mode  average mode  multiply mode  screen mode  darken mode  lighten mode  difference modes  overlay mode  hard light mode  soft light mode  dodge modes  burn modes  quadratic modes  additive modes  interpolation mode  logical modes  RGB modes  HSL modes  opacity  dark modes  bright modes  final words  components  about me  color burn mode  Description: This mode is some kind of inverted screen mode (the multiplication is replaced by a division of the "inverse"). Formula: f(a,b) = 1 - (1 - a) / b Disadvantage: The formula can result in values smaller than 0, so some truncation can occur. Code: if b = 0 then result := 0 else begin c := 255 - (((255-a) SHL 8) DIV b); if c < 0 then result := 0 else result := c; end; inverse color burn mode  Description: I've never seen this mode anywhere, probably because it is the same than color burn mode, but base color and blend color are swapped (diagram 2 equals "flipped screen mode"). Formula: f(a,b) = 1 - (1 - b) / a Disadvantage: The formula can result in values smaller than 0, so some truncation can occur. Code: if a = 0 then result := 0 else begin c := 255 - (((255-b) SHL 8) DIV a); if c < 0 then result := 0 else result := c; end; soft burn mode  Description:
This mode is a combination of color burn and inverse color dodge mode, but a lot smoother than both of them. The base image is lightened a bit, but very dark blend colors are "burned" in. I chose this name, because my aim was to make the color burn mode softer.

Formula:
 f(a,b) = ½b / (1 - a) (for a + b < 1) 1 - ½(1 - a) / b (else)  © Copyright 2006 by PEGTOP Software 