<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Symbols",
  "identifier" : "/documentation/Symbols/NSSymbolVariableColorEffect",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Symbols"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSymbolVariableColorEffect"
  },
  "title" : "NSSymbolVariableColorEffect"
}
-->

# NSSymbolVariableColorEffect

A type that replaces the opacity of variable layers in a symbol-based image in a repeatable sequence.

```
@interface NSSymbolVariableColorEffect : NSSymbolEffect
```

## Overview

A variable color animation draws attention to a symbol by changing the opacity of the symbol’s layers. You can choose to apply the effect to layers either cumulatively or iteratively. For cumulative animations, each layer’s opacity remains changed until the end of the animation cycle. For iterative animations, each layer’s opacity changes briefly before returning to its original state.

> Note:
> Variable color animations affect only symbols containing variable color layers.

```objc
// Add an effect in AppKit and UIKit.
// Iteratively activates layers.
NSSymbolEffectOptions *options = [NSSymbolEffectOptions optionsWithRepeatCount:1];
[self.imageView1 addSymbolEffect:[NSSymbolVariableColorEffect.effect effectWithIterative] options: options];

// Cumulatively activates layers reversing and repeating three times.
NSSymbolEffectOptions *options = [NSSymbolEffectOptions optionsWithRepeatCount:3];
NSSymbolVariableColorEffect *effect =
    [[NSSymbolVariableColorEffect.effect effectWithHideInactiveLayers] effectWithReversing];
[self.imageView2 addSymbolEffect:effect options:options];
```

## Topics

### Accessing symbol effects

[`effect`](/documentation/Symbols/NSSymbolVariableColorEffect/effect)

An animation that replaces the opacity of variable layers in a symbol-based image in a repeatable sequence.

### Controlling fill style

[`effectWithCumulative`](/documentation/Symbols/NSSymbolVariableColorEffect/effectWithCumulative)

An effect that enables each layer of a symbol-based image in sequence.

[`effectWithIterative`](/documentation/Symbols/NSSymbolVariableColorEffect/effectWithIterative)

An effect that momentarily enables each layer of a symbol-based image in sequence.

### Changing playback style

[`effectWithNonReversing`](/documentation/Symbols/NSSymbolVariableColorEffect/effectWithNonReversing)

An effect that doesn’t reverse each time it repeats.

[`effectWithReversing`](/documentation/Symbols/NSSymbolVariableColorEffect/effectWithReversing)

An effect that reverses each time it repeats.

### Affecting inactive layers

[`effectWithDimInactiveLayers`](/documentation/Symbols/NSSymbolVariableColorEffect/effectWithDimInactiveLayers)

An effect that dims inactive layers in a symbol-based image.

[`effectWithHideInactiveLayers`](/documentation/Symbols/NSSymbolVariableColorEffect/effectWithHideInactiveLayers)

An effect that hides inactive layers in a symbol-based image.



---

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)