changingminds.org

How we change what others think, feel, believe and do

| Menu | Quick | Books | Share | Search | Settings |

 

Dave's Colour Selection

 

Disciplines > Photography > Affinity Photo > Resources > Dave's Colour Selection

Download | Discussion | ... | See Also

 

Download

Click here to download the latest 'Dave's Colour Selection' macro set.

To insert this into your library, simply click on the 3-line 'hamburger' on the top right of the library panel, click on 'Import Macros...' and point it at the downloaded file. Then click on the layer for which you want a model and click once on the appropriate macro in the 'Dave's Colour Selection' library group category.

Discussion

The macros in this category all focus on selection of colour. A simple selection would give a hard edge, so softening of 'nearby' values are also often available.

Why so many macros? Partly because each has a slightly different result. And partly because this was an exploratory exercise. If you want just one, try the Delta E-94. You can of course delete ones you don't use.

Most macros take a copy of the original (by Merge Visible) and then apply a Procedural Texture calculation (with various adjustment sliders) to select particular parts of the image, and making the rest of the image transparent. Sitting on top of the original you will see no effect until you apply an adjustment to the top layer (with the PT applied). You can also turn the top layer into masks, selections, etc. (using macros from Dave's Selection-Masker free macro set).

And of course you can use masking and Opacity adjustments to control how much of the effect is applied to the original.

RGB Selection

This is a simple macro based on selecting by basic RGB.

Description

This macro simply lets you select a colour based on an RGB value. To give a wider scope than just the single colour, a Tolerance control lets you also select colours near the target one.

Controls

  • Red Target (0..255): Red value on 8 bit scale to seek.

  • Red Fine Adjust: Tilts the target value to allow for fine adjustment.
  • Green Target (0..255): Green value on 8 bit scale to seek.
  • Green Fine Adjust: Tilts the target value to allow for fine adjustment.
  • Blue Target (0..255): Blue value on 8 bit scale to seek.
  • Blue Fine Adjust: Tilts the target value to allow for fine adjustment.
  • Tolerance: Increasing this widens the range of colours that will be selected. When this is zero, only pixels which match the target values will be selected.

Discussion

This is a very simple selector – other macros give more sophisticated methods. Its particular value is when you want to find pixels of a particular value, and perhaps with a slight variation on this.

Tolerance is a simple variation that uses the inverse of the tolerance slider value as an exponent.

Dave's selection macros use a common principle which is to make a copy of the visible image and then add a Procedural Texture adjustment which changes just the alpha (transparency) values. To make use of this requires either hiding layers below or adding a contrasting fill layer (such as magenta, yellow or cyan) just below the selection layer.

RGB Weighted Selection

This is a simple selector based on the principle or turning up or down the RGB channels in each pixel.

Description

After running the macro, hide all the layer beneath and open the Procedural Texture adjustment to see the controls.

The effect is that turning up/down, a Weight slider, results in all pixels with red in them will have their channel value increased/decreased and the difference with the original shown. Turning down a single slider has no effect, but if a slider has been turned up, then turning down a second value will change the selection in proportion to the value of the second channel value.

Strength simply changes the amount of selection made.

Controls

  • Red Weight: Increases or decreases the transparency of pixels in proportion to the red content in them.
  • Green Weight: Increases or decreases the transparency of pixels in proportion to the green content in them.
  • Blue Weight: Increases or decreases the transparency of pixels in proportion to the blue content in them.
  • Offset: Increases or decreases the number of pixels selected.
  • Strength: Increases the opacity of pixels selected.

Discussion

The simple algorithm used is to multiply the slider by the channel value and use the sum of these to control alpha (transparency). Offset is an addition and Strength is simply a multiplier of this.

Dave's selection macros use a common principle which is to make a copy of the visible image and then add a Procedural Texture adjustment which changes just the alpha (transparency) values. To make use of this requires either hiding layers below or adding a contrasting fill layer (such as magenta, yellow or cyan) just below the selection layer.

HSL Colour Selection

This is a set of live layers that allow for non-destructive selection and adjustment, using the HSL wheel as the main selection method. This allows an easy selection and fade off.

Description

To use this macro after clicking on it, first hide all layer below the HSL Colour Selection layer. By default, only red areas will appear as selected. Then click on the arrow to the left of the HSL Colour Selection Layer to open up the further controls. Adjust these from the bottom (Select Colour first) as described in 'Controls' below.

Layers

Select Colour (HSL)

The first filter from the left is pre-selected (usually Red, but appears as Cyan). Click on this.

The colour wheel is preset to select red. Either grab the wheel opposite the red and rotate the whole thing to select another colour, or adjust the individual nodes.

Refine (Procedural Texture)

Use this to refine the selection.

  • Calculation (0..4): Change the value of this between 0 and 4 to see the result of different formulae. 0 will select most and 4 will select least.
  • Remove Near Monochrome: Slide the slider right to remove odd pixels and areas that have been selected that look grey-ish. The more you move the slider, the more of the darker selected colours will be removed.

Removals (Mask)

Paint black on the mask to remove any further stray pixels or areas you want to remove. Paint white to restore them.

Soften Edges (Gaussian Blur)

Adjust the value of this control to soften any hard edges. It is a good idea to zoom right into edges so you can see the pixels when using this control.

Discussion

This works by using an HSL colour filter, then making a selection of all but the colour wanted and desaturating this. The next task is to make desaturated, grey areas invisible, which is done using the Procedural Texture. In this, you can choose one of five algorithms that gives different 'strength' of selection, and also adjust for 'almost grey' areas that are not caught by the basic formula.

In addition, a simple white mask is added, that has no effect. Paint black on this to mask out any areas not caught. Finally a blur is added to allow for smoothing edges that are jagged, as caused by one of the harder algorithms available.

Dave's selection macros use a common principle which is to make a copy of the visible image and then add a Procedural Texture adjustment which changes just the alpha (transparency) values. To make use of this requires either hiding layers below or adding a contrasting fill layer (such as magenta, yellow or cyan) just below the selection layer.

Colour Selection (Delta E-76)

This is a colour selection calculation using the international standard Delta E-76.

Description

After running the macro, hide all the layer beneath and open the Procedural Texture adjustment to see the controls.

Given an RGB value, the macro produces a selection based on a target RGB colour.

To use this, enter your RGB target values (find these perhaps from a part of the image using such as the Info panel). The 'fine adjust' controls may be used as simple fine tuning or may be used as standalone controls (leave the 'target' values at zero).

You can see the colour as selected by hiding layers below. You can then add any further controls to adjust the area selected.

Adjust Tolerance and Hardness to suit (you can also use Opacity). Be aware of any hard edges that may become visible in the final image.

Controls

  • Red target (0-255): Value of red channel to target.
  • Red fine adjust: Variation on red target (or use as analogue control).
  • Green target (0-255): Value of red channel to target.
  • Green fine adjust: Variation on green target (or use as analogue control).
  • Blue target (0-255): Value of red channel to target.
  • Blue fine adjust: Variation on blue target (or use as analogue control).
  • Tolerance: Variation allowed beyond target colour.
  • Hardness: Feathering and contrast across selected colour.

Discussion

The colour selection here is done using the international CIE Delta E-76 standard (published in 1976). The formula is relatively simple but is based on a root-mean-square calculation off a LAB colour model. The LAB conversion requires a fairly complex bit of code to translate from RGB (via an intermediate XYZ standard). The result, however, is a pretty good selection mechanism. There are also more complex algorithms in Delta E-94 and Delta E-2000. The differences between the selected colours is not huge.

The 'fine adjust' control simply adds to the target value, allowing for analogue variation on the numeric target. It may also be used standalone, leaving the target value at zero.

Delta generally means 'difference' in mathematics. The "E" in Delta E is derived from "Empfindung", the German word for sensation. Now isn't that exciting.

Dave's selection macros use a common principle which is to make a copy of the visible image and then add a Procedural Texture adjustment which changes just the alpha (transparency) values. To make use of this requires either hiding layers below or adding a contrasting fill layer (such as magenta, yellow or cyan) just below the selection layer.

Colour Selection (Delta E-94)

This is a colour selection calculation using the international standard Delta E-94.

Description

After running the macro, hide all the layer beneath and open the Procedural Texture adjustment to see the controls.

Given an RGB value, the macro produces a selection based on a target RGB colour.

To use this, enter your RGB target values (find these perhaps from a part of the image using such as the Info panel). The 'fine adjust' controls may be used as simple fine tuning or may be used as standalone controls (leave the 'target' values at zero).

You can see the colour as selected by hiding layers below. You can then add any further controls to adjust the area selected.

Adjust Tolerance and Hardness to suit (you can also use Opacity). Be aware of any hard edges that may become visible in the final image.

Adjust Hue, Chroma (like Saturation) and Lightness weight to change the emphasis between these, for example to put more emphasis on hue, increase its value. Note that while these nominally should add up to 1, there is no programmed constraint and you can experiment as you wish.

Controls

  • Red target (0-255): Value of red channel to target.
  • Red fine adjust: Variation on red target (or use as analogue control).
  • Green target (0-255): Value of red channel to target.
  • Green fine adjust: Variation on green target (or use as analogue control).
  • Blue target (0-255): Value of red channel to target.
  • Blue fine adjust: Variation on blue target (or use as analogue control).
  • Tolerance: Variation allowed beyond target colour.
  • Hardness: Feathering and contrast across selected colour.
  • Lightness weight: Normally 0.33, this allows variation in balance of emphasis between Lightness, Chroma (similar to Saturation) and Hue.
  • Chroma weight: Normally 0.33, this allows variation in balance of emphasis between Lightness, Chroma (similar to Saturation) and Hue.
  • Hue weight: Normally 0.33, this allows variation in balance of emphasis between Lightness, Chroma (similar to Saturation) and Hue.

Discussion

The colour selection here is done using the international CIE Delta E-94 standard (published in 1994). The algorithm is based on a LAB colour model, which requires a fairly complex bit of code to translate from RGB (via an intermediate XYZ standard). The result, however, is a pretty good selection mechanism which is tighter than Delta E-76 (which has a far simpler algorithm). A more complex algorithm again is found in Delta E-2000. The differences between the selected colours is not huge.

The 'fine adjust' control simply adds to the target value, allowing for analogue variation on the numeric target. It may also be used standalone, leaving the target value at zero.

Nominally, Lightness, Hue and Chroma should add up to 1, but there is no programmed constraint so you can experiment with other values if you wish.

Delta generally means 'difference' in mathematics. The "E" in Delta E is derived from "Empfindung", the German word for sensation. Now isn't that exciting.

Dave's selection macros use a common principle which is to make a copy of the visible image and then add a Procedural Texture adjustment which changes just the alpha (transparency) values. To make use of this requires either hiding layers below or adding a contrasting fill layer (such as magenta, yellow or cyan) just below the selection layer.

3M Colour Selection

This is a simple selector based on the principle or turning up or down channels in each pixel, based on their 3M position (max, mid or min).

Description

After running the macro, hide all the layer beneath and open the Procedural Texture adjustment to see the controls.

The effect is that turning up/down, a Weight slider, results in all pixels that fits the max/mid/min position in them will have their channel value increased/decreased and the difference with the original shown. Turning down a single slider has no effect, but if a slider has been turned up, then turning down a second value will change the selection in proportion to the value of the second channel value.

Offset increases the pixel range selected. Strength simply changes the amount of selection made.

Controls

  • Maximum Weight: Increases or decreases the transparency of pixels based on whether this has a maximum value.
  • Middle Weight: Increases or decreases the transparency of pixels based on whether this has a middle value (between maximum and minimum).
  • Minimum Weight: Increases or decreases the transparency of pixels based on whether this has a minimum value.
  • Offset: Increases or decreases the number of pixels selected.
  • Strength: Increases the opacity of pixels selected.

Discussion

The simple algorithm used is to multiply the slider by the channel value and use the sum of these to control alpha (transparency). Offset is an addition and Strength is simply a multiplier of this.

Dave's selection macros use a common principle which is to make a copy of the visible image and then add a Procedural Texture adjustment which changes just the alpha (transparency) values. To make use of this requires either hiding layers below or adding a contrasting fill layer (such as magenta, yellow or cyan) just below the selection layer.

Select Colour/Tone

This is a simple separation of the more colourful (saturated) pixels from those closer to monochrome.

Description

After running the macro, hide all the layer beneath and open the Procedural Texture adjustment to see the controls.

Select Colour or Tone depending on whether you want to select for colour or monochrome (and nearby). Then increase the Selection Limit until the desired selection is made.

Note that when you have a given Selection Limit set, switching the Colour/Tone value effectively inverts the selection.

Controls

  • 0=Colour;1=Tone: Determines whether the more colourful or monochromatic pixels are selected.
  • Selection Limit: Increasing this increases the number and degree of pixels selected.

Discussion

The selection of pixels depends on the colourfulness, which is calculated as the gap between the maximum and minimum values of RGB.

Note that if you select Colour, set the limit, copy the pixel layer and adjustment, then flip to Tone, the combined image is not exactly the same as the original as the composite Alpha is not 1 everywhere. This is due to the way that alpha (opacity) in multiple layers is combined. To get full opaqueness, you need an original image underneath to catch the affected pixels.

Dave's selection macros use a common principle which is to make a copy of the visible image and then add a Procedural Texture adjustment which changes just the alpha (transparency) values. To make use of this requires either hiding layers below or adding a contrasting fill layer (such as magenta, yellow or cyan) just below the selection layer.

See also

If you are having problems downloading the macros, click here to download as zip file.

 

Site Menu

| Home | Top | Quick Links | Settings |

Main sections: | Disciplines | Techniques | Principles | Explanations | Theories |

Other sections: | Blog! | Quotes | Guest articles | Analysis | Books | Help |

More pages: | Contact | Caveat | About | Students | Webmasters | Awards | Guestbook | Feedback | Sitemap | Changes |

Settings: | Computer layout | Mobile layout | Small font | Medium font | Large font | Translate |

 

You can buy books here

More Kindle books:

And the big
paperback book


Look inside

 

Please help and share:

 

Quick links

Disciplines

* Argument
* Brand management
* Change Management
* Coaching
* Communication
* Counseling
* Game Design
* Human Resources
* Job-finding
* Leadership
* Marketing
* Politics
* Propaganda
* Rhetoric
* Negotiation
* Psychoanalysis
* Sales
* Sociology
* Storytelling
* Teaching
* Warfare
* Workplace design

Techniques

* Assertiveness
* Body language
* Change techniques
* Closing techniques
* Conversation
* Confidence tricks
* Conversion
* Creative techniques
* General techniques
* Happiness
* Hypnotism
* Interrogation
* Language
* Listening
* Negotiation tactics
* Objection handling
* Propaganda
* Problem-solving
* Public speaking
* Questioning
* Using repetition
* Resisting persuasion
* Self-development
* Sequential requests
* Storytelling
* Stress Management
* Tipping
* Using humor
* Willpower

Principles

* Principles

Explanations

* Behaviors
* Beliefs
* Brain stuff
* Conditioning
* Coping Mechanisms
* Critical Theory
* Culture
* Decisions
* Emotions
* Evolution
* Gender
* Games
* Groups
* Habit
* Identity
* Learning
* Meaning
* Memory
* Motivation
* Models
* Needs
* Personality
* Power
* Preferences
* Research
* Relationships
* SIFT Model
* Social Research
* Stress
* Trust
* Values

Theories

* Alphabetic list
* Theory types

And

About
Guest Articles
Blog!
Books
Changes
Contact
Guestbook
Quotes
Students
Webmasters

 

| Home | Top | Menu | Quick Links |

© Changing Works 2002-
Massive Content — Maximum Speed

Site Menu

| Home | Top | Quick Links | Settings |

Main sections: | Disciplines | Techniques | Principles | Explanations | Theories |

Other sections: | Blog! | Quotes | Guest articles | Analysis | Books | Help |

More pages: | Contact | Caveat | About | Students | Webmasters | Awards | Guestbook | Feedback | Sitemap | Changes |

Settings: | Computer layout | Mobile layout | Small font | Medium font | Large font | Translate |

 

 

Please help and share:

 

Quick links

Disciplines

* Argument
* Brand management
* Change Management
* Coaching
* Communication
* Counseling
* Game Design
* Human Resources
* Job-finding
* Leadership
* Marketing
* Politics
* Propaganda
* Rhetoric
* Negotiation
* Psychoanalysis
* Sales
* Sociology
* Storytelling
* Teaching
* Warfare
* Workplace design

Techniques

* Assertiveness
* Body language
* Change techniques
* Closing techniques
* Conversation
* Confidence tricks
* Conversion
* Creative techniques
* General techniques
* Happiness
* Hypnotism
* Interrogation
* Language
* Listening
* Negotiation tactics
* Objection handling
* Propaganda
* Problem-solving
* Public speaking
* Questioning
* Using repetition
* Resisting persuasion
* Self-development
* Sequential requests
* Storytelling
* Stress Management
* Tipping
* Using humor
* Willpower

Principles

+ Principles

Explanations

* Behaviors
* Beliefs
* Brain stuff
* Conditioning
* Coping Mechanisms
* Critical Theory
* Culture
* Decisions
* Emotions
* Evolution
* Gender
* Games
* Groups
* Habit
* Identity
* Learning
* Meaning
* Memory
* Motivation
* Models
* Needs
* Personality
* Power
* Preferences
* Research
* Relationships
* SIFT Model
* Social Research
* Stress
* Trust
* Values

Theories

* Alphabetic list
* Theory types

And

About
Guest Articles
Blog!
Books
Changes
Contact
Guestbook
Quotes
Students
Webmasters

 

| Home | Top | Menu | Quick Links |

© Changing Works 2002-
Massive Content — Maximum Speed