title: Special Color Blend Mode to Tint Image
body: <p>I'm trying to tint an image. But this time a more tricky variant.</p>
  
  <ul>
  <li><p>The image has got <code>saturation</code>, <code>brightness</code> and <code>alpha</code> information (sadly as RGBA), which should <em>not</em> be discarded (saturation for black shadow).</p></li>
  <li><p>The tint color has got <code>hue</code>, <code>saturation</code>, <code>brightness</code> and <code>alpha</code> information (sadly also as RGBA) which also should not be discarded.</p></li>
  <li><p>As I imagine it, each HSBA component (except to hue) should be <em>multiplied</em> to have full control about the tinted image - e.g. when I provide a less bright tint color, the image brightness should also be scaled down.</p></li>
  </ul>
  
  <p>So, something like:</p>
  
  <pre><code>(h,s,b,a) = (h_tint, s_tint*s_image, b_tint*b_image, a_tint*a_image)
  </code></pre>
  
  <p>I searched the internet, but this procedure <strong>does not seem to be common</strong>, even when ignoring the alpha channel (or even the saturation too) for the moment.</p>
  
  <p>I'd need it in iOS, but I didn't even find such a layer blend mode in Photoshop. I've tried (in iOS and if existing in Photoshop):</p>
  
  <ul>
  <li><code>Multiply</code> - does not look at all like what I want</li>
  <li><code>Darken</code> - not really</li>
  <li><code>Color Dodge</code> - at least somewhat usable, but not really right</li>
  <li><code>Plus Darker</code> - also ok, but not really</li>
  <li><code>Color</code> / <code>Luminosity</code> / <code>Hue</code> - these would have been my favourites, but they <strong>discard the tint's saturation and brightness values</strong> instead of multiplicating them. But maybe if there is a way of applying the missing saturation and brightness afterwards?</li>
  </ul>
  
  <p><strong>So, has the described blend mode a common name / would it make sense?</strong></p>
  
  <p><strong>Any ideas on how to do this in iOS?</strong> (I'm aware of the Apple Developer <a href="http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_images/dq_images.html#//apple_ref/doc/uid/TP30001066-CH212-CJBIJEFG" rel="nofollow noreferrer">Guide</a> and <a href="http://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CGContext/Reference/reference.html#//apple_ref/doc/c_ref/CGBlendMode" rel="nofollow noreferrer">Reference</a>, and the stackoverflow questions <a href="https://stackoverflow.com/questions/3514066/how-to-tint-a-transparent-png-image-in-iphone/3524872#3524872">about tinting</a> and <a href="https://stackoverflow.com/questions/845278/overlaying-a-uiimage-with-a-color/1162285#1162285">overlaying</a>)</p>