NSColor

Utilite functions for NSColor used in theme.

  • Get the hex String value for this NSColor.

    This returns the #rrggbb string (without the opacity).

    Declaration

    Swift

    public var hexValue: String
  • Parses the NSColor from the given hexString.

    Allowed String formats: #rrggbb or #aarrggbb.

    Declaration

    Swift

    public static func fromHexString(_ hexString: String) -> NSColor
  • Converts the given hexInt to NSColor.

    Declaration

    Swift

    public static func fromHex(_ hexInt: Int, useAlpha: Bool = false) -> NSColor

    Parameters

    hexInt

    the color to convert.

    useAlpha

    true if the alpha bits should be preserved.