Class AnsiColors

java.lang.Object
org.springframework.boot.ansi.AnsiColors

public final class AnsiColors extends Object
Utility for working with AnsiColor in the context of AWT Colors.
Since:
1.4.0
Author:
Craig Burke, Ruben Dijkstra, Phillip Webb, Michael Simons
  • Constructor Details

    • AnsiColors

      public AnsiColors(AnsiColors.BitDepth bitDepth)
      Create a new AnsiColors instance with the specified bit depth.
      Parameters:
      bitDepth - the required bit depth
  • Method Details

    • findClosest

      public AnsiElement findClosest(Color color)
      Find the closest ANSI color to the given AWT Color.
      Parameters:
      color - the AWT color
      Returns:
      the closest ANSI color