Class ColorUtils

    • Constructor Summary

      Constructors 
      Constructor Description
      ColorUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.eclipse.lsp4j.Color getColorValue​(String text)
      Returns the Color instance value from the given text and null otherwise.
      static int hexDigit​(int charCode)  
      static boolean isHexNumber​(String text)  
      static org.eclipse.lsp4j.ColorPresentation toHexa​(org.eclipse.lsp4j.Color color, org.eclipse.lsp4j.Range replace, boolean addHash)
      Returns the Hexa color presentation of the given color and replace range.
      static org.eclipse.lsp4j.ColorPresentation toRGB​(org.eclipse.lsp4j.Color color, org.eclipse.lsp4j.Range replace)
      Returns the RGB color presentation of the given color and replace range.
    • Constructor Detail

      • ColorUtils

        public ColorUtils()
    • Method Detail

      • getColorValue

        public static org.eclipse.lsp4j.Color getColorValue​(String text)
        Returns the Color instance value from the given text and null otherwise.
        Parameters:
        text - the color text.
        Returns:
        the Color instance value from the given text and null otherwise.
      • toRGB

        public static org.eclipse.lsp4j.ColorPresentation toRGB​(org.eclipse.lsp4j.Color color,
                                                                org.eclipse.lsp4j.Range replace)
        Returns the RGB color presentation of the given color and replace range.
        Parameters:
        color - the color.
        replace - the replace range.
        Returns:
        the RGB color presentation of the given color and range.
      • toHexa

        public static org.eclipse.lsp4j.ColorPresentation toHexa​(org.eclipse.lsp4j.Color color,
                                                                 org.eclipse.lsp4j.Range replace,
                                                                 boolean addHash)
        Returns the Hexa color presentation of the given color and replace range.
        Parameters:
        color - the color.
        replace - the replace range.
        Returns:
        the Hexa color presentation of the given color and range.
      • hexDigit

        public static int hexDigit​(int charCode)
      • isHexNumber

        public static boolean isHexNumber​(String text)