# Background color of all pages

**URL:** <https://forum.inductiveautomation.com/t/background-color-of-all-pages/98267>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 6, 2024, 10:47am UTC](https://forum.inductiveautomation.com/t/background-color-of-all-pages/98267 "2024-11-06T10:47:56Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [November 6, 2024, 10:47am UTC](https://forum.inductiveautomation.com/t/background-color-of-all-pages/98267/1 "2024-11-06T10:47:57Z")

</div>

Hello!

I would like to change the background color of all my pages to white instead light grey.

I tried with

body {  
background-color: #f0f0f0;  
}

on the stylesheet.css but is not working

Any ideas welcome

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 6, 2024, 11:03am UTC](https://forum.inductiveautomation.com/t/background-color-of-all-pages/98267/2 "2024-11-06T11:03:39Z")

</div>

White would be `#ffffff`, not `#f0f0f0`.

- Launch your project and use your browser's Development Tools (F12).
- Use the Inspection Tool (top left on the Developer toolbar) and click the page background.
- In the Styles tab you will find the following:

```python
.ia_container--root {
    background-color: var(--containerRoot);
}

```

You could hard-code your `#ffffff` or `white` in there but I recommend that you use a [built-in theme color](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/styles/perspective-built-in-themes#built-in-theme-colors) such as `--neutral-10` which is very close to white but will adjust automatically if you change your theme.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 6, 2024, 11:11am UTC](https://forum.inductiveautomation.com/t/background-color-of-all-pages/98267/3 "2024-11-06T11:11:44Z")

</div>

> [@Transistor](#):
>
> such as `--neutral-10` which is very close to white

~~`white`~~ `--white` will turn to black in dark mode fwiw, although I wouldn't ever recommend using pure white or black

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 6, 2024, 11:17am UTC](https://forum.inductiveautomation.com/t/background-color-of-all-pages/98267/4 "2024-11-06T11:17:03Z")

</div>

> [@nminchin](#):
>
> `white` will turn to black in dark mode ...

That's the idea.

> [@nminchin](#):
>
> although I wouldn't ever recommend using pure white or black.

They're not in the built-in themes.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 6, 2024, 11:26am UTC](https://forum.inductiveautomation.com/t/background-color-of-all-pages/98267/5 "2024-11-06T11:26:47Z")

</div>

the word "white" is an in build css color, that turns to black in darkmode (depending on some things, which i dont know if perspective did, cant test atm)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 6, 2024, 11:36am UTC](https://forum.inductiveautomation.com/t/background-color-of-all-pages/98267/6 "2024-11-06T11:36:31Z")

</div>

They are, although I think the theme ones area actually `--white` and `--black`. Using just white and black will use the standard css colours which may not change with the theme

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 6, 2024, 3:43pm UTC](https://forum.inductiveautomation.com/t/background-color-of-all-pages/98267/7 "2024-11-06T15:43:25Z")

</div>

its possible for it to auto change with themes, but it requires someextra config, which perspective probably didnt do since they have their own colors.

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [November 6, 2024, 3:55pm UTC](https://forum.inductiveautomation.com/t/background-color-of-all-pages/98267/8 "2024-11-06T15:55:45Z")

</div>

Yes, thanks for the help!  
For a white background is probably a good idea to set up the starting theme as light to don´t mess with all themes preconfiguration. Looking for a way to do this. Cheers.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 6, 2024, 4:04pm UTC](https://forum.inductiveautomation.com/t/background-color-of-all-pages/98267/9 "2024-11-06T16:04:32Z")

</div>

If there is no theme selector in your application then there is no problem.

If there is or was a theme selector then something like this:

 ![Initialise theme](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/7/a7ceb3cc4582fa04dc5187e5fe52fc999d980880.png)

`now(0)` will fire once when the application is loaded.  
The transform ignores the `now()` and just returns "light".

I think there is a simpler way but I can't remember right now.

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [November 6, 2024, 4:06pm UTC](https://forum.inductiveautomation.com/t/background-color-of-all-pages/98267/10 "2024-11-06T16:06:39Z")

</div>

Thanks Transistor! will try this!

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 6, 2024, 7:47pm UTC](https://forum.inductiveautomation.com/t/background-color-of-all-pages/98267/11 "2024-11-06T19:47:14Z")

</div>

You can just return light as a string in the expression binding, no need for the now
