<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLTextureSwizzleChannels/init(red:green:blue:alpha:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:So25MTLTextureSwizzleChannelsa3red5green4blue5alphaABSo0aB0V_A3Htcfc"
  },
  "title" : "init(red:green:blue:alpha:)"
}
-->

# init(red:green:blue:alpha:)

Creates a swizzle pattern.

```
init(red: MTLTextureSwizzle, green: MTLTextureSwizzle, blue: MTLTextureSwizzle, alpha: MTLTextureSwizzle)
```

## Parameters

`red`

The data you want to copy to the first output channel

`green`

The data you want to copy to the second output channel

`blue`

The data you want to copy to the third output channel

`alpha`

The data you want to copy to the fourth output channel

---

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)