Java HTML HTMLtoRGB(String htmlColor)

Here you can find the source of HTMLtoRGB(String htmlColor)

Description

Parses HTML color representation

License

Open Source License

Parameter

Parameter Description
htmlColor HTML representation of the color #RRGGBB

Return

Integer color value

Declaration

public static int HTMLtoRGB(String htmlColor) 

Method Source Code

//package com.java2s;

public class Main {
    /**//w  w w  .  j  a va2  s  . com
     * Parses HTML color representation
     *
     * @param htmlColor HTML representation of the color #RRGGBB
     * @return Integer color value
     */
    public static int HTMLtoRGB(String htmlColor) {
        return Integer.parseInt(htmlColor.replace("#", ""), 16);
    }
}

Related

  1. htmlSafe(String field)
  2. htmlSafe(String value)
  3. htmlSize(String str)
  4. htmlString(String str)
  5. htmlText(String text)
  6. HTMLToTriplet(String color)
  7. htmlWrap(String text)
  8. htmlWrap(StringBuilder s)