---
title: color
framework: modelio
role: symbol
role_heading: Instance Property
path: modelio/mdlmaterialproperty/color
---

# color

The color value for the material property.

## Declaration

```swift
var color: CGColor? { get set }
```

## Discussion

Discussion A material property with a color value uses a uniform color for all pixels rendered using the material. This option is useful for base colors of solid-color objects, and also for material semantics where variation across the surface of the material is unnecessary. To vary colors across a surface, use a texture image instead.

## See Also

### Working with a Material Property’s Value

- [stringValue](modelio/mdlmaterialproperty/stringvalue.md)
- [urlValue](modelio/mdlmaterialproperty/urlvalue.md)
- [textureSamplerValue](modelio/mdlmaterialproperty/texturesamplervalue.md)
- [floatValue](modelio/mdlmaterialproperty/floatvalue.md)
- [float2Value](modelio/mdlmaterialproperty/float2value.md)
- [float3Value](modelio/mdlmaterialproperty/float3value.md)
- [float4Value](modelio/mdlmaterialproperty/float4value.md)
- [matrix4x4](modelio/mdlmaterialproperty/matrix4x4.md)
