Android examples for Graphics:Color Alpha
Convert int color value to Color String No Alpha
//package com.java2s; import android.graphics.Color; public class Main { public static String toColorStringNoAlpha(int bgColor) { return "#" + hex2(Color.red(bgColor)) + hex2(Color.green(bgColor)) + hex2(Color.blue(bgColor)); }/*from w w w. j av a 2 s. c o m*/ public static String hex2(int val) { String a = Integer.toHexString(val); if (a.length() < 2) { a = "0" + a; } return a; } }