ankur jain
ankur jain

Reputation: 51

how to get color name from hexadecimal or RGB code in android?

I am unable to get color name from hexadecimal code of color or RGB. I know that the combination of color is vast 255*255*255. how can i show the color name by RGB or hexadecimal.

I tried with threshold but unable to show more color name please guide me or share any source code for java or android.

Thanks

Upvotes: 1

Views: 1971

Answers (1)

Harshad Pansuriya
Harshad Pansuriya

Reputation: 20910

You can give hexadecimal color using parseColor method Color class.

Try Color class method:

public static int parseColor (String colorString)

Exmple :

textView.TextColor = Color.parseColor("#FF0000");

Upvotes: 1

Related Questions