I’m doing porting app from Iphone to Android related to RGB colors.
Is there any equivalent for CGColorGetComponents in Android?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I usually get my argb values manually by using bit level operations. You can wrap this in a helper method that returns it as an array if it’s more convenient.
If you need floats, you can do something like this
If you’re doing this many times (such as looping through the pixels in a Bitmap), you probably want to use a single array and pass it in, replacing the values in the method instead of instantiating a new array.