Programmatically determine the average greyscale

-hh hh at livecode.org
Thu Feb 18 18:24:45 EST 2016


Hi BR (thanks for the abbreviation),

First you have to decide in detail what you want.

1. What is an average for you?
Usual arithmetic mean is one option, other simple ones are a weighted mean of rgb (used by Photoshop etc.) or median values.
2. How to use the alphavalues?
Max, min, median, weighted means are again options.

This is not at all trivial. The designers here will have extremely diverging examples for different 'averaging'.

Perhaps it is much easier (and much faster) to simply set the ink of the button to give a high contrast?

hh



More information about the use-livecode mailing list