In article <3ac43695$1@news.povray.org>, "Bonsai" <bon### [at] b0n541net>
wrote:
> groups:
>
> How can I calculate the grey equivalent of a given rgb color?
Try this macro:
#macro Grayscale(Color)
(0.297*Color.red + 0.589*Color.green + 0.114*Color.blue)
#end
This uses the same equation that POV uses internally.
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|