<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PhysicallyBasedMaterial/baseColor-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation23PhysicallyBasedMaterialV9baseColorAC04BaseG0Vvp"
  },
  "title" : "baseColor"
}
-->

# baseColor

The color of an entity unmodified by lighting.

```
var baseColor: PhysicallyBasedMaterial.BaseColor { get set }
```

## Discussion

The base color of an entity is either a solid color or a UV-mapped image
texture. This property represents the color of the entity before
RealityKit applies any lighting or rendering calculations.

To determine the appearance of the entity, RealityKit modifies the
entity’s base color using its material properties and the light sources
in the scene.

You can define an entity’s base color using a `CGColor`, a UV-mapped
image texture, or both. If you only provide a color, RealityKit uses
that as the base color for the entire entity. If you specify only an
image texture, it applies that texture as the base color of the entity.
If you provide both a color and a texture, RealityKit tints the image
texture using the color.

Here’s an example of using a single color to specify base color:

```swift
var material = PhysicallyBasedMaterial()
material.baseColor = PhysicallyBasedMaterial.BaseColor(tint:.red)
```

The following example demonstrates how to use an image to specify base
color:

```swift
var material = PhysicallyBasedMaterial()

    // Load entity_basecolor.png from the app's bundle.
    if let baseResource = try? TextureResource.load(named: "entity_basecolor") {
        // Create a material parameter and assign it.
        let baseColor = MaterialParameters.Texture(baseResource)
        material.baseColor = PhysicallyBasedMaterial.BaseColor(texture:baseColor)
    }
```

---

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)