Color to grayscale algorithm

Wow! Will look now. Thank you for sharing.