   pegtop.net  >  delphi section  >  articles  >  blend modes  >  dodge 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 dodge mode  Description: This mode is some kind of inverted multiply mode (the multiplication is replaced by a division of the "inverse"). Formula: f(a,b) = a / (1 - b) Disadvantage: The formula can result in values greater than 1, so some truncation can occur. Code: if b = 255 then result := 255 else begin c := (a SHL 8) DIV (255-b); if c > 255 then result := 255 else result := c; end; inverse color dodge mode  Description: I've never seen this mode anywhere, probably because it is the same than color dodge mode, but base color and blend color are swapped (diagram 2 equals "flipped multiply mode"). Formula: f(a,b) = b / (1 - a) Disadvantage: The formula can result in values greater than 1, so some truncation can occur. Code: if a = 255 then result := 255 else begin c := (b SHL 8) DIV (255-a); if c > 255 then result := 255 else result := c; end; soft dodge mode  Description:
This mode is a combination of color dodge and inverse color burn mode, but a lot smoother than both of them. The base image is darkened a bit, but very bright blend colors are "dodged" in. I chose this name, because my aim was to make the color dodge mode softer.

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