Jump to content
dmstraker

Dave's Colour Models Macros -- Layer Separation (including RGB, RGBW, CMY, CMYK and HSL)

Recommended Posts

Attached is a macro set for splitting RGB image into separate layers for a number of colour models.

  • RGB: Basic separation
  • RGBW: New model! Like CMYK but Red, Green, Blue and White
  • RGB-W: Like RGBW but only two layers for separate colour/tone editing
  • CMY: Effective inverse of RGB
  • CMYK: Standard internal model
  • CMY-K: Like CMYK, but with only two layers for separate colour/tone editing
  • HSL: New model! Hue, Saturation and Luminosity on separate layers!
  • HSL-RGB: Same as HSL, but with Hue broken down into separate RGB layers

Principles used in doing these:

  • Start with 'Merge Visible' to create flat layer for base (saves tripping over adjustments)
  • End with single layer group (so you can delete it in one go if you don't like it
  • Named layers, so you know which is which
  • Keep it simple (just the layers, no 'edit ready' adjustments such as curves, sharpening)
  • Fast as possible (so RGB done with channels, CMYK with curves, etc), though new ones need Apply Image which can be very slow!

Any bugs, etc. please let me know. Do be patient with Apply Image adjustments and don't try to 'Esc' out as this can leave you in limbo.

Enjoy!

Dave's Colour Models V1.afmacros

Share this post


Link to post
Share on other sites
15 hours ago, dmstraker said:

Any bugs, etc. please let me know. Do be patient with Apply Image adjustments and don't try to 'Esc' out as this can leave you in limbo.

Thanks Dave, tested these and they all worked as expected in the iPad version of Photo. :)

Share this post


Link to post
Share on other sites

   HSL separation test, I appreciated the explanation
   I still haven't understood why the Hue layer should be in multiply mode, but that's correct.

Very good result in RVB  32 Bit linear.

 In RGB 8 & 16 bit (integer), little less precise color,  truncation error in  calculations, I think.
Thanks Dave .:)

Share this post


Link to post
Share on other sites

Hue multiplies with Saturation to cancel out the min-max numerator and denominator. Just channel maths, not creative blending as such.

H=(Sx-min)/(max-min)
S=max-min
so
H*S=Sx-min
then
L=min
so
original value (in combined layers) = H*S+L

...

And yes, probably some trunc/round error? Maybe accuracy of float as values are 0-1. Perhaps it does the sums in 8-bit?

Share this post


Link to post
Share on other sites

Thank Dave

Yes I saw that the truncation, or the rounding  is  more important than I thought.
 

  • put a pixel layer with a solid color,
  • add a white layer, and
  • subtract another white layer.

1-1 = O => the effect should be canceled, and we should return to the original color.

yes or no depending on the encoding depth.  

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Please note the Annual Company Closure section in the Terms of Use. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.