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

# fadeAlpha(by:duration:)

Creates an action that adjusts the alpha value of a node by a relative value.

## Declaration

```swift
class func fadeAlpha(by factor: CGFloat, duration: TimeInterval) -> SKAction
```

## Parameters

- `factor`: The amount to add to the node’s alpha value.
- `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 reversible; the reverse is created as if the following code is executed:

## See Also

### Animating the Transparency of a Node

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