Color

public enum Color : Equatable, Hashable

The various ways in which the color was expressed

  • This means that the foreground color stores 8 bits of information for the color (the original ANSI colors, plus a crop of colors and greys - those defined in Color.setupDefaultAnsiColors and additionally we reserve two values “defaultForeground” and “defaultBackground” that indicate that the terminal can pick the right values for those.

    Declaration

    Swift

    case ansi256(code: UInt8)
  • This means that the color has been configured to be a 24-bit true color and has 8 bits for red, green and blue

    Declaration

    Swift

    case trueColor(red: UInt8, green: UInt8, blue: UInt8)
  • Indicates that the cell uses the default foreground color

    Declaration

    Swift

    case defaultColor
  • Indicates that the cell uses teh default backgrond color (also used as the inverse color)

    Declaration

    Swift

    case defaultInvertedColor
  • Declaration

    Swift

    public static func == (lhs: Color, rhs: Color) -> Bool