java.lang.Object
fr.opensagres.xdocreport.document.textstyling.html.HTMLColorParser

public class HTMLColorParser extends Object
Colors in CSS can be defined in a few different ways: - As hexadecimal values (supported) - As RGB values (supported) - By color names (supported) - As HSL values (CSS3) (supported) - As HWB values (CSS4) (unsupported) - With the currentcolor keyword (unsupported)
  • Constructor Details

    • HTMLColorParser

      public HTMLColorParser()
  • Method Details

    • parse

      public static Color parse(String colorString)
      Parameters:
      colorString - an rgb color string i.e. rgb(255,0,0);
      Returns:
      null if colorString invalid or not implemented, so that invalid arguments won't crash the program