Color

public class Color : Hashable

This represents the colors used in SwiftTerm, in particular for cells and backgrounds in 16-bit RGB mode

  • red

    Red component 0..65535

    Declaration

    Swift

    public var red: UInt16
  • Green component 0..65535

    Declaration

    Swift

    public var green: UInt16
  • Blue component 0..65535

    Declaration

    Swift

    public var blue: UInt16
  • Declaration

    Swift

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

    Swift

    public func hash(into hasher: inout Hasher)
  • Installs the new colors as the default colors and recomputes the current and ansi palette. This will not change the UI layer, for that it is better to call the installColors method on TerminalView, which will both call this method, and update the display appropriately.

    Declaration

    Swift

    public static func installPalette(colors: [Color])

    Parameters

    colors

    this should be an array of 16 values that correspond to the 16 ANSI colors, if the array does not contain 16 elements, it will not do anything

  • Initializes a color with the red, green and blue components in the 0…65535 range

    Declaration

    Swift

    public init(red: UInt16, green: UInt16, blue: UInt16)