Java Hex Format formatColorInt2HexString(int c)

Here you can find the source of formatColorInt2HexString(int c)

Description

format Color Int Hex String

License

Apache License

Declaration

public static String formatColorInt2HexString(int c) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static String formatColorInt2HexString(int c) {
        String s = "";
        try {//from www  .j  a  va  2s  .c  o m
            s = String.format("#%06X", (0xFFFFFF & c));
        } catch (Exception e) {
        }
        return s;
    }
}

Related

  1. formatAsHex(long msgId)
  2. formatAsHexUppercase(long msgId)
  3. formatAsRawHex(int bitStringLength, String hex)
  4. formatBytes2HexString(byte[] bytes, int offset, int length)
  5. formatByteToPaddedHex(int i, int l)
  6. formatGuidToDashedNotation(String hexValue)
  7. formatHEX(byte[] btValue, int iOffset, int iLength)
  8. formatHex(double theG)
  9. formatHex(int value, int width)