Java JComponent Color convertHtmlColorNameToColor(String htmlColorName)

Here you can find the source of convertHtmlColorNameToColor(String htmlColorName)

Description

convert Html Color Name To Color

License

Apache License

Declaration

public static Color convertHtmlColorNameToColor(String htmlColorName) 

Method Source Code


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

import java.awt.Color;

import javax.swing.text.html.StyleSheet;

public class Main {
    public static Color convertHtmlColorNameToColor(String htmlColorName) {
        StyleSheet sheet = new StyleSheet();
        return sheet.stringToColor(htmlColorName.toLowerCase());

    }/*from  ww  w . j a  v a2  s .  com*/
}

Related

  1. applyBackgroundToSubComponents(Container container, Color color)
  2. buildTextPane(String text, Color foreground)
  3. color(String string, AttributeSet set)
  4. createColorChooser(Component component)
  5. createDisabledTextComponent (String text, Color color, boolean textField)
  6. createDisabledTextField (String text, Color color)
  7. createHorizontalLine(Color background)