Java Hex Calculate toHex(int color)

Here you can find the source of toHex(int color)

Description

to Hex

License

Open Source License

Declaration

private static String toHex(int color) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static String toHex(int color) {
        String rv = Integer.toHexString(color);
        if (color <= 0x0F)
            return "0" + rv;
        else//from w  w  w . jav  a  2s.  c o  m
            return rv;
    }
}

Related

  1. toHex(final int i)
  2. toHex(final int value)
  3. toHex(final String input)
  4. toHex(int ch)
  5. toHex(int ch)
  6. toHex(int decimalDigit)
  7. toHex(int h, int minDigit)
  8. toHex(int i)
  9. toHex(int i)