happyzhang187
happyzhang187

Reputation: 61

Can't use UIColor(red:,green:,blue:,) in FontColor of SKLabelNode in SpriteKit

I don't know why I can't use that in SpriteKit. If I try UIColor(red:156,green:187,blue:214) the color turns out white. It is not the color that it should be and I don't know why it doesn't work.

Upvotes: 1

Views: 49

Answers (1)

Vatsal
Vatsal

Reputation: 18181

Change

UIColor(red:156,green:187,blue:214)

to:

UIColor(red: 156/255.0, green: 187/255.0, blue: 214/255.0)

Upvotes: 5

Related Questions