Question: In my app, I have for example 5 available colors for different Task that user can choose between them anytime. I thought it would be good to have a class of color and I declare few colors inside the class that in any controller I can access to those colors as an Array. For example when I want to show the colors to pickup, I want them as an array. But I don't know how to do that? I create a class but in the init part, I don't know how to add colors

```
final class Colors {
    var color : [UIColor]

    init(color: [UIColor]) {

    }
}

```

Your help will be appreciated.

Answer: 
Extend UIColor, make your colors static properties, and make your array a computed static property.
> 
> I thought it would be good to have a class of color and I declare few colors inside the class that in any controller I can access to those colors as an Array.
> 
> 
> 

An enumeration would work well for this. The set of colors is fixed, right? It sounds like you won't need distinct instances of the set of colors, and it'd probably be nice to be able to access the colors without needing to create an object or bother with sharing an object. An enumeration gives you a set of discrete values, and it can have methods associated with it. For example, you could have a `darkGreen` value, and then methods like `uiColor()` and `cgColor()` that return `UIColor` and `CGColor` objects that correspond to that value.