Change color of glyph in button's attributed title

I wrote this code to add an image, a glyph, to a Button's title:

let myAttribute: [NSAttributedString.Key : Any] = [ .foregroundColor : UIColor.yellow ]
let myAttrString1 = NSMutableAttributedString(string: "", attributes: myAttribute)
let image1Attachment = NSTextAttachment()
image1Attachment.image = UIImage(named: "myImage")
let image1String = NSAttributedString(attachment: image1Attachment)
myAttrString1.append(image1String)
myButton.setAttributedTitle(myAttrString1, for : UIControl.State.normal)
let myAttrString2 = NSAttributedString(string: "selected", attributes: myAttribute)
myButton.setAttributedTitle(myAttrString2, for: UIControl.State.selected)

How can I change the glyph color?

The color of the same glyph added as the Button Image follow setTitleColor but I'm not able to change the glyph color when in the attributed text.