*** -colorSpaceName not valid

Here is a relatively simple code fragment:

let attributedQuote: [NSAttributedString.Key: Any] = [ .font: FieldFont!, .foregroundColor: NSColor.red]

let strQuote = NSAttributedString.init(string:"Hello World", attributes:attributedQuote)

strQuote.draw(in: Rect1)

It compiles without an issue, bur when I execute it, I get:

"*** -colorSpaceName not valid for the NSColor <NSColor: 0x6000005adfd0>; need to first convert colorspace."

I have tried everything I can think of. What's going on?

*** -colorSpaceName not valid
 
 
Q