---
title: colorMatrixFromDesiredRGBToYCbCr()
framework: Professional Video Applications
role: symbol
role_heading: Instance Method
platforms: [fxplug 4.0+]
path: professional_video_applications/fxcolorgamutapi_v2/colormatrixfromdesiredrgbtoycbcr()
---

# colorMatrixFromDesiredRGBToYCbCr()

Returns a color matrix that is appropriate for converting RGB values in the project’s working gamut into YCbCr values.

## Declaration

```swift
func colorMatrixFromDesiredRGBToYCbCr() -> FxMatrix44!
```

## Mentioned in

Managing color space and gamut in plug-ins

## Return Value

Return Value A 4x4 matrix for converting an RGB value into YCbCr.

## Discussion

Discussion You can use the first row of the resulting matrix of this function to convert from RGB to grayscale.

## See Also

### Getting Color Gamut Information

- [colorMatrixFromYCbCrToDesiredRGB()](professional_video_applications/fxcolorgamutapi_v2/colormatrixfromycbcrtodesiredrgb().md)
- [colorPrimaries()](professional_video_applications/fxcolorgamutapi_v2/colorprimaries().md)
