---
title: "fadeAlpha(to:duration:)"
framework: spritekit
role: symbol
role_heading: Type Method
path: "spritekit/skaction/fadealpha(to:duration:)"
---

# fadeAlpha(to:duration:)

Creates an action that adjusts the alpha value of a node to a new value.

## Declaration

```swift
class func fadeAlpha(to alpha: CGFloat, duration: TimeInterval) -> SKAction
```

## Parameters

- `alpha`: The new value of the node’s alpha.
- `duration`: The duration of the animation.

## Return Value

Return Value A new action object.

## Discussion

Discussion When the action executes, the node’s alpha property animates to its new value. This action is not reversible; the reverse of this action has the same duration but does not change anything.

## See Also

### Animating the Transparency of a Node

- [fadeIn(withDuration:)](spritekit/skaction/fadein(withduration:).md)
- [fadeOut(withDuration:)](spritekit/skaction/fadeout(withduration:).md)
- [fadeAlpha(by:duration:)](spritekit/skaction/fadealpha(by:duration:).md)
