<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKAction/colorize(with:colorBlendFactor:duration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKAction(cm)colorizeWithColor:colorBlendFactor:duration:"
  },
  "title" : "colorize(with:colorBlendFactor:duration:)"
}
-->

# colorize(with:colorBlendFactor:duration:)

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

```
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`](/documentation/SpriteKit/SKSpriteNode) object. When the action executes, the sprite’s [`color`](/documentation/SpriteKit/SKSpriteNode/color) and [`colorBlendFactor`](/documentation/SpriteKit/SKSpriteNode/colorBlendFactor) properties are animated to their new values.

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)