As stated in NSColor docs for getRed:blue:green:alpha::
This method works only with objects representing colors in the NSCalibratedRGBColorSpace or NSDeviceRGBColorSpace color space. Sending it to other objects raises an exception.
Obj-C implementation uses method swizzling, but swift calls these methods without any checks, so here is a very quick fix.
As stated in
NSColor
docs forgetRed:blue:green:alpha:
:Obj-C implementation uses method swizzling, but swift calls these methods without any checks, so here is a very quick fix.