|
![](/i/fill.gif) |
SamuelT <STB### [at] aol com> wrote:
: It's for the eval_pigment stuff I've been using. I needed to convert a color
: vector into a float value so I could use it for elevation.
So in practice what you are trying to do is to convert a color to b/w
(ie. a brightness value).
There's an exact formula on how each color component affects the brightness,
and I don't remember exactly the values, but this might be a good
approximation:
brightness = red*0.25 + green*0.6 + blue*0.15
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |