---
title: stringRepresentation
framework: coreimage
role: symbol
role_heading: Instance Property
path: coreimage/cicolor/stringrepresentation
---

# stringRepresentation

Returns a formatted string with the unpremultiplied color and alpha components of the color.

## Declaration

```swift
var stringRepresentation: String { get }
```

## Discussion

Discussion The string representation always has four components: red, green, blue, and alpha. Some example string representations of colors:  |   |   |  To create a CIColor instance from a string representation, use the init(string:) method. If the CIColor was initialized with a CGColor in a non-RGB CGColorSpace then it will be converted to sRGB to get the red, green, and blue components. This property is not KVO-safe because it returns a new NSString instance each time. The value of the NSString will be the same each time it is called.

## See Also

### Getting Color Components

- [colorSpace](coreimage/cicolor/colorspace.md)
- [components](coreimage/cicolor/components.md)
- [numberOfComponents](coreimage/cicolor/numberofcomponents.md)
- [red](coreimage/cicolor/red-swift.property.md)
- [green](coreimage/cicolor/green-swift.property.md)
- [blue](coreimage/cicolor/blue-swift.property.md)
- [alpha](coreimage/cicolor/alpha.md)
