0
I wanted to know without having to post my code, how to get the main color of a certain point within a ImageView
, for example I have a frame and within that frame has 3 colors,
the color on the right is red, the color on the left is blue, and the middle color is black, but I just want to get the middle color without having to return that the color on the left or right is blue/red.
How do I do that?
If anyone could help me I’d be very grateful.
Speak man, beauty ? So thank you so much for answering me, could you help me out on one more thing ? I was wondering if after I picked up this color I could use an if to check what color he found in the center, in hexadecimal but if you have another solution other than hexadecimal, I’d appreciate it!
– Dibai
This hexadecimal is stored in a string?
– ramaral
Color.parseColor(string)
returns aint
. Behold here the format of string.– ramaral
Yeah, so far so much more I could do like this:
if(colorfoto == white){
 //condição
}
– Dibai
What value would I have to use instead of white, to define whether the color in the center of the photo is white or not ?
– Dibai
if(colorfoto == Color.WHITE){.....}
– ramaral
And if it was another kind of color like Snow.
– Dibai
If you know Hexadecimal do so:
if(colorfoto == Color.parseColor("#FFFAFA")){...}
– ramaral
Let’s go continue this discussion in chat.
– Dibai