Android Int to Color Convert GetColorString(int ColorInt)

Here you can find the source of GetColorString(int ColorInt)

Description

Get Color String

Declaration

public static String GetColorString(int ColorInt) 

Method Source Code

//package com.java2s;

import android.util.Log;

public class Main {
    public static final String TAG = "AList";

    public static String GetColorString(int ColorInt) {
        String colorString = null;
        try {//from   w w  w.ja  v a 2 s  .  c o m
            colorString = String.format("#%06X", 0xFFFFFF & ColorInt);

        } catch (Exception e) {
            Log.e(TAG, "An Exception error occurred in GetColorString. ", e);
        }
        return colorString;
    }
}

Related

  1. RGBArray(Resources resources, int colorId)