Java Color to Hex toHex0x(Color col)

Here you can find the source of toHex0x(Color col)

Description

to Hexx

License

Open Source License

Declaration

private static String toHex0x(Color col) 

Method Source Code

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

import java.awt.Color;

public class Main {
    private static String toHex0x(Color col) {
        return String.format("0x%02x%02x%02x", col.getRed(),
                col.getGreen(), col.getBlue());
        //return "0x"+Integer.toHexString(col.getRGB() & 0xffffff);
    }/*w w  w . j  a  v  a2  s  .  c o  m*/
}

Related

  1. toHex(Color color)
  2. toHex(Color color)
  3. toHex(Color color)
  4. toHex(Color color)
  5. toHex(java.awt.Color color)
  6. toHexCode(String prefix, Color color)
  7. toHexColor(Color col)
  8. toHexColor(Color col)
  9. toHexColor(final Color color)