---
title: colorMaterialEnabled
framework: GLKit
role: symbol
role_heading: Instance Property
platforms: [iOS 5.0+, iPadOS 5.0+, macOS 10.8+, tvOS 9.0+]
path: glkit/glkbaseeffect/colormaterialenabled
---

# colorMaterialEnabled

A Boolean value that indicates whether or not to use the color vertex attribute when calculating the light’s interaction with the material.

## Declaration

```swift
var colorMaterialEnabled: GLboolean { get set }
```

## Discussion

Discussion If the value is set to GL_TRUE, then the color attribute provided in the vertex data is used as the material’s color when performing any lighting calculations. If the value is set to GL_FALSE then the colors stored in the material property are used to light the primitive. The default value is GL_FALSE.

## See Also

### Configuring Color Information

- [useConstantColor](glkit/glkbaseeffect/useconstantcolor.md)
- [constantColor](glkit/glkbaseeffect/constantcolor.md)
