Chandan, that will not give you a gray color ! Just an intensity. Then you have to use that to generate a gray RGB.
Besides, that the color components, should be weighted differently, due to different sensitivity of the eye color receptors for each color. There is a colorFilter for Gray scale in one of the Android APIs, but I don't know if it's suitable to what "Mi" wants to do. To convert a single color, you can search on google for "convert RGB to gray scale" for example. You are shure to find several suitable answers. An example: intensity = 0.30R + 0.59G + 0.11B On Apr 10, 12:32 pm, Chandan <[EMAIL PROTECTED]> wrote: > Intensity = ( R + G + B ) / 3 > > On Apr 10, 4:02 pm, Mi <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I'm wondering if it is possible to get the gray color representing a > > specified color? Or can I in some way calculate it from the red, green > > and blue component in a color? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

