<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vImage_YpCbCrToARGBMatrix/init(Yp:Cr_R:Cr_G:Cb_G:Cb_B:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:So25vImage_YpCbCrToARGBMatrixV0B00D2_R0D2_G0C2_G0C2_BABSf_S4ftcfc"
  },
  "title" : "init(Yp:Cr_R:Cr_G:Cb_G:Cb_B:)"
}
-->

# init(Yp:Cr_R:Cr_G:Cb_G:Cb_B:)

Creates a 3 x 3 matrix for converting Y’CbCr signals to RGB.

```
init(Yp: Float, Cr_R: Float, Cr_G: Float, Cb_G: Float, Cb_B: Float)
```

## Parameters

`Yp`

The `Yp` in the conversion matrix.

`Cr_R`

The `Cr_R` in the conversion matrix.

`Cr_G`

The `Cr_G` in the conversion matrix.

`Cb_G`

The `Cb_G` in the conversion matrix.

`Cb_B`

The `Cb_B` in the conversion matrix.

## Return Value

A 3 x 3 matrix for converting Y’CbCr signals to RGB.

## Discussion

The vImage library uses this matrix to convert from YpCbCr to RGB using the following multiplication:

```
                    | R |   | Yp    0     Cr_R |   | Y' |
                    | G | = | Yp   Cb_G   Cr_G | * | Cb |
                    | B |   | Yp   Cb_B     0  |   | Cr |
```

---

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)