Question: My `CAMetalLayer` background color is black, even if i'm assigning new color as the `backgroundColor` property.

Am i missing something? Thanks!

Link to the original project :

<https://github.com/audiokit/MetalParticles>

Answer: 
This project takes a rather unconventional approach to clearing the drawable's texture each frame: it replaces the textures contents with an array of zeros that is the same size as the texture (width \* height \* 4). Subsequently, it encodes some compute work that actually draws the particles. This is almost certainly not the most efficient way to achieve this effect, but if you want to make the smallest change that could possibly work (as opposed to experimenting with making the code as efficient as possible), Just fill the `blankBitmapRawData` array with your desired clear color (near line 82 of ParticleLab.swift).
I have gone through your code and can not see a place where you are setting background Color.

The metal layer is added as a sublayer to it, so you have to set it explicitly.

Add this line at the end of your init method in `ParticialLab` class and see if it works.

```
self.backgroundColor = UIColor.redColor().CGColor

```