Posted by julian_m on 07/04/06 09:22
Do anyone know an algorithm which retieves a grey value given certain
rgb value?
I'm needing this kind of function:
$grey = RGBtoGrey('#ffffff');
where $grey (function's return value) should be a real number in [0;1]
range
Googling a little bit, I found an equation which seems to be aplied by
many photo-editor software
(.3*Red) + (.59*Green) + (.11*Blue)= Luminance/brightness
I'm just wondering whether someone here has better ideas...
regards - julian
Navigation:
[Reply to this message]
|