title: Algorithm of bitmap getbrightness() in C#
body: <p>I want to implement a function in java that calculate brightness of a color exactly as same as  C# getbrightness() function. So I need to know the exact algorithm that used in C#. There is some algorithms <a href="https://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color">here</a> but all of them have about 5% error.</p>