NSColor

class NSColor : NSObject, NSCopying, NSSecureCoding, NSPasteboardReading, NSPasteboardWriting
  • Get the hex String value for this NSColor.

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

    Declaration

    Swift

    public var hexValue: String { get }
  • Parses the NSColor from the hexString.

    Allowed String formats: #rrggbb or #aarrggbb.

    Declaration

    Swift

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

    Declaration

    Swift

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