# Get color in variables.css in .ts file

**URL:** <https://forum.ionicframework.com/t/get-color-in-variables-css-in-ts-file/144775>\
**Category:** Ionic Framework\
**Created:** [October 17, 2018, 9:47am UTC](https://forum.ionicframework.com/t/get-color-in-variables-css-in-ts-file/144775 "2018-10-17T09:47:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hanmoxiaosheng](https://avatars.discourse-cdn.com/v4/letter/h/a9a28c/32.png) [@Hanmoxiaosheng](https://forum.ionicframework.com/u/Hanmoxiaosheng)\
**Post date:** [October 17, 2018, 9:47am UTC](https://forum.ionicframework.com/t/get-color-in-variables-css-in-ts-file/144775/1 "2018-10-17T09:47:30Z")

</div>

I want to get the colors in …/theme/variables.css, since i want to set the status bar color by code in my .ts file, is there any way can do this?

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:13pm UTC](https://forum.ionicframework.com/t/get-color-in-variables-css-in-ts-file/144775/2 "2021-07-19T21:13:06Z")

</div>

Closed on July 19, 2021, 9:13pm UTC


