Replace
NSStrokeColorAttributeName : arraycontaininginfo[3]
with
NSStrokeColorAttributeName : colorPicked
and see what happens.
Source:
NSStrokeColorAttributeName
NSColor
Default nil, same as foreground color
Available in OS X v10.3 and later. Declared in NSAttributedString.h.