---
title: "init(named:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uicolor/init(named:)"
---

# init(named:)

Creates a color object using the information from the named asset.

## Declaration

```swift
init?(named name: String)
```

## Parameters

- `name`: The name of the asset containing the color.

## Return Value

Return Value An initialized color object. The returned object uses the color space specified for the asset.

## See Also

### Creating a color from component values

- [init(white:alpha:)](uikit/uicolor/init(white:alpha:).md)
- [init(hue:saturation:brightness:alpha:)](uikit/uicolor/init(hue:saturation:brightness:alpha:).md)
- [init(red:green:blue:alpha:)](uikit/uicolor/init(red:green:blue:alpha:).md)
- [init(red:green:blue:alpha:exposure:)](uikit/uicolor/init(red:green:blue:alpha:exposure:).md)
- [init(red:green:blue:alpha:linearExposure:)](uikit/uicolor/init(red:green:blue:alpha:linearexposure:).md)
- [init(displayP3Red:green:blue:alpha:)](uikit/uicolor/init(displayp3red:green:blue:alpha:).md)
- [init(named:inBundle:compatibleWithTraitCollection:)](uikit/uicolor/init(named:inbundle:compatiblewithtraitcollection:).md)
