---
title: "color(_:)"
framework: swiftui
role: symbol
role_heading: Type Method
path: "swiftui/shader/argument/color(_:)"
---

# color(_:)

Returns an argument value representing color. When passed to a MSL function it will convert to a half4 value, as a premultiplied color in the target color space.

## Declaration

```swift
static func color(_ color: Color) -> Shader.Argument
```

## See Also

### Creating argument values

- [boundingRect](swiftui/shader/argument/boundingrect.md)
- [colorArray(_:)](swiftui/shader/argument/colorarray(_:).md)
- [data(_:)](swiftui/shader/argument/data(_:).md)
- [float(_:)](swiftui/shader/argument/float(_:).md)
- [float2(_:)](swiftui/shader/argument/float2(_:).md)
- [float2(_:_:)](swiftui/shader/argument/float2(_:_:).md)
- [float3(_:_:_:)](swiftui/shader/argument/float3(_:_:_:).md)
- [float4(_:_:_:_:)](swiftui/shader/argument/float4(_:_:_:_:).md)
- [floatArray(_:)](swiftui/shader/argument/floatarray(_:).md)
- [image(_:)](swiftui/shader/argument/image(_:).md)
