Class Colors


  • public class Colors
    extends java.lang.Object
    Helper class for dealing with color rounding. This is a simplified version of the JLine's one at https://github.com/jline/jline3/blob/a24636dc5de83baa6b65049e8215fb372433b3b1/terminal/src/main/java/org/jline/utils/Colors.java
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int[] DEFAULT_COLORS_256
      Default 256 colors palette
    • Constructor Summary

      Constructors 
      Constructor Description
      Colors()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int roundColor​(int col, int max)  
      static int roundRgbColor​(int r, int g, int b, int max)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_COLORS_256

        public static final int[] DEFAULT_COLORS_256
        Default 256 colors palette
    • Constructor Detail

      • Colors

        public Colors()
    • Method Detail

      • roundColor

        public static int roundColor​(int col,
                                     int max)
      • roundRgbColor

        public static int roundRgbColor​(int r,
                                        int g,
                                        int b,
                                        int max)