<!--
{
  "availability" : [
    "iOS: 26.4.0 -",
    "iPadOS: 26.4.0 -",
    "macCatalyst: 26.4.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ImmersiveMediaSupport",
  "identifier" : "/documentation/ImmersiveMediaSupport/FadeCommand/init(id:time:duration:direction:color:offset:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Immersive Media Support"
    ],
    "preciseIdentifier" : "s:21ImmersiveMediaSupport11FadeCommandV2id4time8duration9direction5color6offsetACSi_So6CMTimeaAkC0D9DirectionOs5SIMD3VySfGAKSgtcfc"
  },
  "title" : "init(id:time:duration:direction:color:offset:)"
}
-->

# init(id:time:duration:direction:color:offset:)

Initializes a color fade command.

```
init(id: Int, time: CMTime, duration: CMTime, direction: FadeCommand.FadeDirection, color: simd_float3, offset: CMTime? = nil)
```

## Parameters

`id`

The unique ID of this command.

`time`

The time this command starts during playback.

`duration`

The duration of the command. This can be `.zero` if the command has no duration.

`direction`

The fade direction for this command instance.

`color`

The fade color.

`offset`

The offset from the start time of this command. This parameter is usually unused and let in control of a `PresentationDescriptorReader`.

---

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)