# \[Solved\] Set opacity of a group to 50 using variable

**URL:** https://community.thunkable.com/t/solved-set-opacity-of-a-group-to-50-using-variable/1893763
**Category:** Questions about Thunkable X
**Created:** [May 24, 2022, 6:38pm UTC](https://community.thunkable.com/t/solved-set-opacity-of-a-group-to-50-using-variable/1893763 "2022-05-24T18:38:02Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![adressepoupelle2r](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@adressepoupelle2r](https://community.thunkable.com/u/adressepoupelle2r)
#### Post date: [May 24, 2022, 6:38pm UTC](https://community.thunkable.com/t/solved-set-opacity-of-a-group-to-50-using-variable/1893763/1 "2022-05-24T18:38:02Z")

</div>

Hello !

I created a simple function that aims to change the opacity of a block from 100 to 50 by using a variable.  
I tested the function and there is a problem : the opacity of my block doesn’t change…  
All the parts of my blocks work individually but not when I put them together…

If anyone can help me, it would be most welcome !

Here is my block:

 ![blocks](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/3/93e68d8eb124da91b3fc7967189649577139b312.png)

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [May 24, 2022, 6:47pm UTC](https://community.thunkable.com/t/solved-set-opacity-of-a-group-to-50-using-variable/1893763/2 "2022-05-24T18:47:23Z")

</div>

Hi, welcome to Thunkable!

What is the starting rgba value for that group’s background color?

Just to be clear: setting the opacity for a group is only going to affect the background color of the group. It’s not going to affect the components inside the group. At least that’s my assumption based on what I know about groups. It would be nice if it did affect all embedded components.

Can you post a link to a simple project that demonstrates the issue you’re seeing?

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [May 24, 2022, 7:33pm UTC](https://community.thunkable.com/t/solved-set-opacity-of-a-group-to-50-using-variable/1893763/3 "2022-05-24T19:33:28Z")

</div>

The `Group` component has its own opacity option. Use this one not the opacity of the color.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [May 24, 2022, 7:38pm UTC](https://community.thunkable.com/t/solved-set-opacity-of-a-group-to-50-using-variable/1893763/4 "2022-05-24T19:38:08Z")

</div>

I only see “touch opacity” and changing that doesn’t seem to do anything. Where are you seeing a group opacity property?

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [May 24, 2022, 7:42pm UTC](https://community.thunkable.com/t/solved-set-opacity-of-a-group-to-50-using-variable/1893763/5 "2022-05-24T19:42:49Z")

</div>

This code fades the background color:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/2/829bd3fb57fb4fa27f3248994f434b393b830cd6.png)

See the first screen of this project (it has your username):

[https://x.thunkable.com/copy/f0d14e9895aab5d1f6a9c9e89ff9b6a7](https://x.thunkable.com/copy/f0d14e9895aab5d1f6a9c9e89ff9b6a7)

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [May 24, 2022, 7:54pm UTC](https://community.thunkable.com/t/solved-set-opacity-of-a-group-to-50-using-variable/1893763/6 "2022-05-24T19:54:14Z")

</div>

Yes, this is the one. If you set the `touch opacity` to 100 then when you click on the group object it will not reveal what’s under it.

This is a new addition.

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [May 24, 2022, 8:03pm UTC](https://community.thunkable.com/t/solved-set-opacity-of-a-group-to-50-using-variable/1893763/7 "2022-05-24T20:03:31Z")

</div>

> [@muneer](#):
>
> s is a new addition.

You can set it in the blocks and in the design panel as well! 🙂

 ![Screen Shot 2022-05-24 at 4.03.07 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/6/8637c570932f7279a3c936bc29c60e6810efaf48.png)

 ![Screen Shot 2022-05-24 at 4.02.21 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/7/c79569ab618a20d147fe977a71c56214106ebaf8.png)

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [May 24, 2022, 9:06pm UTC](https://community.thunkable.com/t/solved-set-opacity-of-a-group-to-50-using-variable/1893763/8 "2022-05-24T21:06:34Z")

</div>

Right but this is only related to a touch/click event, yes? So if you wanted to fade the opacity of a group without detecting a touch, you couldn’t.

---

<div class="post-metadata">

### Author: ![adressepoupelle2r](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@adressepoupelle2r](https://community.thunkable.com/u/adressepoupelle2r)
#### Post date: [May 25, 2022, 12:43pm UTC](https://community.thunkable.com/t/solved-set-opacity-of-a-group-to-50-using-variable/1893763/9 "2022-05-25T12:43:29Z")

</div>

Yes that’s what I was looking for.  
Thanks a lot for your help !!!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [August 23, 2022, 12:44pm UTC](https://community.thunkable.com/t/solved-set-opacity-of-a-group-to-50-using-variable/1893763/10 "2022-08-23T12:44:01Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
