Contents

colorize(with:colorBlendFactor:duration:)

Creates an animation that animates a sprite’s color and blend factor.

Declaration

class func colorize(with color: UIColor, colorBlendFactor: CGFloat, duration: TimeInterval) -> SKAction
class func colorize(with color: NSColor, colorBlendFactor: CGFloat, duration: TimeInterval) -> SKAction

Parameters

  • color:

    The new color for the sprite.

  • colorBlendFactor:

    The new blend factor for the sprite.

  • duration:

    The duration of the animation.

Return Value

A new action object.

Discussion

This action can only be executed by an SKSpriteNode object. When the action executes, the sprite’s color and colorBlendFactor properties are animated to their new values.

This action is not reversible; the reverse of this action does nothing.

See Also

Animating a Node’s Texture