---
title: "colorize(with:colorBlendFactor:duration:)"
framework: spritekit
role: symbol
role_heading: Type Method
path: "spritekit/skaction/colorize(with:colorblendfactor:duration:)"
---

# colorize(with:colorBlendFactor:duration:)

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

## Declaration

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

```swift
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

Return Value A new action object.

## Discussion

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

- [resize(byWidth:height:duration:)](spritekit/skaction/resize(bywidth:height:duration:).md)
- [resize(toHeight:duration:)](spritekit/skaction/resize(toheight:duration:).md)
- [resize(toWidth:duration:)](spritekit/skaction/resize(towidth:duration:).md)
- [resize(toWidth:height:duration:)](spritekit/skaction/resize(towidth:height:duration:).md)
- [setTexture(_:)](spritekit/skaction/settexture(_:).md)
- [setTexture(_:resize:)](spritekit/skaction/settexture(_:resize:).md)
- [animate(with:timePerFrame:)](spritekit/skaction/animate(with:timeperframe:).md)
- [animate(with:timePerFrame:resize:restore:)](spritekit/skaction/animate(with:timeperframe:resize:restore:).md)
- [setNormalTexture(_:)](spritekit/skaction/setnormaltexture(_:).md)
- [setNormalTexture(_:resize:)](spritekit/skaction/setnormaltexture(_:resize:).md)
- [animate(withNormalTextures:timePerFrame:)](spritekit/skaction/animate(withnormaltextures:timeperframe:).md)
- [animate(withNormalTextures:timePerFrame:resize:restore:)](spritekit/skaction/animate(withnormaltextures:timeperframe:resize:restore:).md)
- [colorize(withColorBlendFactor:duration:)](spritekit/skaction/colorize(withcolorblendfactor:duration:).md)
