# Change color of radio button selected text

**URL:** <https://forum.ionicframework.com/t/change-color-of-radio-button-selected-text/215409>\
**Category:** Ionic Vue\
**Created:** [September 25, 2021, 12:52am UTC](https://forum.ionicframework.com/t/change-color-of-radio-button-selected-text/215409 "2021-09-25T00:52:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dillonvuong](https://avatars.discourse-cdn.com/v4/letter/d/838e76/32.png) [@dillonvuong](https://forum.ionicframework.com/u/dillonvuong)\
**Post date:** [September 25, 2021, 12:52am UTC](https://forum.ionicframework.com/t/change-color-of-radio-button-selected-text/215409/1 "2021-09-25T00:52:45Z")

</div>

How can I change the color of ionic label text when the radio button is checked? This is what I am trying to do but I don’t know how to translate it to ionic CSS:

> <https://stackoverflow.com/questions/41267402/change-radio-button-labels-color-when-radio-button-is-selected>

![image](https://global.discourse-cdn.com/ionicframework/original/3X/c/7/c7474100ed0696045d20f9f6ae8988f0e90b23ad.png)

```auto
ion-label input[type="radio"]:checked {

  color:red !important;  

}

```

I want both the box and the words “Rigid Frame 20"” to turn red when it is checked.

Here is the HTML code:

```auto
          <ion-radio-group mode= 'ios' value='chairs' @ionChange='changeColor'>
            <ion-item v-for='chair in chairs' v-bind:key='chair.name' lines='none'>
              <ion-label v-if="chair.type == 'AUWR'" style="color:#CACACC; line-height: 24px; font-size: 16px; letter-spacing: -0.25px;">{{chair.name}} <span>{{showMetric ? inchesToMetric(chair.size) + 'cm' : chair.size + '"'}}</span></ion-label>
              <ion-label v-if="chair.type == 'OWR'" style="color:#CACACC; line-height: 24px; font-size: 16px; letter-spacing: -0.25px;">{{chair.name}}</ion-label>
              <ion-radio slot='start' v-model='chair.name' @click='onClickRadio(chair.size)' style='width:23px;height:23px;border-radius:4px;border:3px solid #D3D7D9;'></ion-radio>
            </ion-item>
          </ion-radio-group>

```

---

<div class="post-metadata">

**Author:** ![ldebeasi](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ldebeasi/32/147501_2.png) [@ldebeasi](https://forum.ionicframework.com/u/ldebeasi)\
**Post date:** [September 27, 2021, 1:22pm UTC](https://forum.ionicframework.com/t/change-color-of-radio-button-selected-text/215409/2 "2021-09-27T13:22:16Z")

</div>

Ionic adds a `.item-radio-checked` class to the `ion-item` when the radio is checked. You can use that as the basis for the selector:

```auto
.item-radio-checked ion-label {
  --color: red;
}

```

---

<div class="post-metadata">

**Author:** ![dillonvuong](https://avatars.discourse-cdn.com/v4/letter/d/838e76/32.png) [@dillonvuong](https://forum.ionicframework.com/u/dillonvuong)\
**Post date:** [September 27, 2021, 5:11pm UTC](https://forum.ionicframework.com/t/change-color-of-radio-button-selected-text/215409/3 "2021-09-27T17:11:13Z")

</div>

![image](https://global.discourse-cdn.com/ionicframework/original/3X/3/6/3638e07a32951253465bdcd13af0974ff82eea1f.png)

Hey Idebeasi, it’s still not changing colors to red. This is what I have so far in variables.css

```auto
ion-radio{
  --color-checked: red !important;
}

ion-label.item-radio-checked {
  --color: red;
}

.item-radio-checked ion-label {
  --color: red !important;
}

```

---

<div class="post-metadata">

**Author:** ![ldebeasi](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ldebeasi/32/147501_2.png) [@ldebeasi](https://forum.ionicframework.com/u/ldebeasi)\
**Post date:** [September 27, 2021, 5:39pm UTC](https://forum.ionicframework.com/t/change-color-of-radio-button-selected-text/215409/4 "2021-09-27T17:39:12Z")

</div>

Hard to say what the issue might be without being able to reproduce it on my end. Can you send over a GitHub repo?

edit: Also `ion-label.item-radio-checked` is not correct as `.item-radio-checked` is a class added to `ion-item` not `ion-label`, so I would not expect that to work.

---

<div class="post-metadata">

**Author:** ![dillonvuong](https://avatars.discourse-cdn.com/v4/letter/d/838e76/32.png) [@dillonvuong](https://forum.ionicframework.com/u/dillonvuong)\
**Post date:** [September 27, 2021, 9:57pm UTC](https://forum.ionicframework.com/t/change-color-of-radio-button-selected-text/215409/5 "2021-09-27T21:57:33Z")

</div>

Hi the solution was to not have --color. It was just color.
