<!--
{
  "availability" : [
    "iOS: 5.0.0 - 12.0.0",
    "iPadOS: 5.0.0 - 12.0.0",
    "macOS: 10.8.0 - 10.14.0",
    "tvOS: 9.0.0 - 12.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GLKit",
  "identifier" : "/documentation/GLKit/GLKBaseEffect/colorMaterialEnabled",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "GLKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GLKBaseEffect(py)colorMaterialEnabled"
  },
  "title" : "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.

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

## 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`](/documentation/GLKit/GLKBaseEffect/material) property are used to light the primitive. The default value is `GL_FALSE`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)