# Color4 properties

**URL:** https://forum.babylonjs.com/t/color4-properties/10927
**Category:** Questions
**Created:** [May 18, 2020, 7:59am UTC](https://forum.babylonjs.com/t/color4-properties/10927 "2020-05-18T07:59:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![startledan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/startledan/32/8509_2.png) [@startledan](https://forum.babylonjs.com/u/startledan)
#### Post date: [May 18, 2020, 7:59am UTC](https://forum.babylonjs.com/t/color4-properties/10927/1 "2020-05-18T07:59:33Z")

</div>

Is there a way to directly read and set individual properties of Color4 objects, other than just in the constructor?

I want to just tweak the alpha values of some colors, without touching the rgb values. Can I modify the values directly or do I need to do this by adding/subtracting/multiplying another color value to the original color?

Sorry if this is an obvious question but I’m relatively new to Babylon.js. So far I’m impressed.

Cheers,  
Dan

edit: I tried just referencing them using dot notation but that doesn’t seem to work.

---

<div class="post-metadata">

### Author: ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)
#### Post date: [May 18, 2020, 9:29am UTC](https://forum.babylonjs.com/t/color4-properties/10927/2 "2020-05-18T09:29:24Z")

</div>

Hi @startledan and welcome to the forum

The answer is you can

```auto
color.r = 0.7; //from 0 to 1
color.g = 0.52 //from 0 to 1
color.b = 0.1 //from 0 to 1
color.a = 1.0 //from 0 to 1

```

---

<div class="post-metadata">

### Author: ![startledan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/startledan/32/8509_2.png) [@startledan](https://forum.babylonjs.com/u/startledan)
#### Post date: [May 19, 2020, 5:53am UTC](https://forum.babylonjs.com/t/color4-properties/10927/3 "2020-05-19T05:53:58Z")

</div>

OK, Thanks. I obviously tried that but it wasn’t working. I must have another error somewhere. Thanks for clarifying.

---

<div class="post-metadata">

### Author: ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)
#### Post date: [May 19, 2020, 10:08am UTC](https://forum.babylonjs.com/t/color4-properties/10927/4 "2020-05-19T10:08:51Z")

</div>

A playground ([https://playground.babylonjs.com](https://playground.babylonjs.com)) is always helpful to help us help you 🙂 Maybe show how how you do it, and we can point out what the issue is.
