Java Color to HTML toHTMLColor(Color c)

Here you can find the source of toHTMLColor(Color c)

Description

to HTML Color

License

Open Source License

Declaration

public static String toHTMLColor(Color c) 

Method Source Code

//package com.java2s;
import java.awt.Color;

public class Main {
    public static String toHTMLColor(Color c) {
        return "#" + Integer.toHexString(c.getRGB()).substring(2);
    }//  w w  w . j a v a  2s  .  co m
}

Related

  1. attemptHTML(String colour)
  2. colourToHtmlString(Color colour)
  3. covertToHtmlColor(Color color)
  4. toHTMLColor(Color c)
  5. toHtmlColor(Color color)
  6. toHtmlColor(Color color)
  7. toHtmlHex(Color color)