# Perspective - is selected text color setting available to add to style or somewhere in session props

**URL:** <https://forum.inductiveautomation.com/t/perspective-is-selected-text-color-setting-available-to-add-to-style-or-somewhere-in-session-props/84699>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 24, 2024, 2:58pm UTC](https://forum.inductiveautomation.com/t/perspective-is-selected-text-color-setting-available-to-add-to-style-or-somewhere-in-session-props/84699 "2024-01-24T14:58:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Travis\_Crooks](https://avatars.discourse-cdn.com/v4/letter/t/3da27b/32.png) [@Travis\_Crooks](https://forum.inductiveautomation.com/u/Travis_Crooks)\
**Post date:** [January 24, 2024, 2:58pm UTC](https://forum.inductiveautomation.com/t/perspective-is-selected-text-color-setting-available-to-add-to-style-or-somewhere-in-session-props/84699/1 "2024-01-24T14:58:12Z")

</div>

Does anyone know where to find the setting in ignition that controls the color of the selected text on the screen. below is the CSS code that controls it. I am working with a predefined theme from my company and the color they picked is impossible to see on a white background.

```auto
***Works on common browsers***
selection {
    background-color: #352e7e;
    color: #fff;
}

```

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [January 24, 2024, 5:17pm UTC](https://forum.inductiveautomation.com/t/perspective-is-selected-text-color-setting-available-to-add-to-style-or-somewhere-in-session-props/84699/2 "2024-01-24T17:17:18Z")

</div>

There are a couple of different places which allow for setting CSS rules, with the differences depending on the scope or breadth of your desired impact.

To apply this setting to:

- Every project on the Gateway, create your own custom theme files which inherit from the default Perspective theme files and place this rule within the appropriate file.
- Just a single project (only available in version 8.1.22 or newer), use the `stylesheet.css` resource available by right-clicking `Styles` in the Project Browser within the Perspective context and selecting `Enable Advanced Stylesheet`.

---

<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:** [January 25, 2024, 7:26am UTC](https://forum.inductiveautomation.com/t/perspective-is-selected-text-color-setting-available-to-add-to-style-or-somewhere-in-session-props/84699/3 "2024-01-25T07:26:30Z")

</div>

> [@Travis\_Crooks](#):
>
> `selection`

you need `::selection` though

---

<div class="post-metadata">

**Author:** ![Travis\_Crooks](https://avatars.discourse-cdn.com/v4/letter/t/3da27b/32.png) [@Travis\_Crooks](https://forum.inductiveautomation.com/u/Travis_Crooks)\
**Post date:** [January 31, 2024, 3:44pm UTC](https://forum.inductiveautomation.com/t/perspective-is-selected-text-color-setting-available-to-add-to-style-or-somewhere-in-session-props/84699/4 "2024-01-31T15:44:17Z")

</div>

I cannot find where to apply the advanced stylesheet under props. can you help me understand how to get this implemented correctly?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/4/44f1606a9b62e77606504f6719949ad31fafc6cf.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/9/39d1b36cd5a08dca5ea3b0502ad7ad5e345da00d.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/f/3f30e46be228c76b316f6f8fb6e07f8da97a2ef8.png)

---

<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:** [January 31, 2024, 3:54pm UTC](https://forum.inductiveautomation.com/t/perspective-is-selected-text-color-setting-available-to-add-to-style-or-somewhere-in-session-props/84699/5 "2024-01-31T15:54:11Z")

</div>

> [@Travis\_Crooks](#):
>
> apply the advanced stylesheet

The advanced stylesheet is always applied

its just a common ccs file. you need knowledge of css to be able to define classes and such...

The naming of the class is wrong the prefix is psc- not psc\_  
and you as always for css you still have to add the class to the component,

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [January 31, 2024, 4:11pm UTC](https://forum.inductiveautomation.com/t/perspective-is-selected-text-color-setting-available-to-add-to-style-or-somewhere-in-session-props/84699/6 "2024-01-31T16:11:33Z")

</div>

This looks like you're trying to set the rule to only apply to certain components which have a Style applied, so that's what my steps will describe. If you want a broader application, the steps will vary.

1. Create a named style within the Style directory. For now, let's assume you name this Style "Selected". You do not need to apply any setting to this class.
2. Set `Landscape in: TextField.props.style.classes` to have a value of "Selected".
3. In the `stylesheet.css` resource, supply the following code:

```CSS
.psc-Selected::selection{
    background-color: #3352e7e;
    color: #fff;
}

```

---

<div class="post-metadata">

**Author:** ![Travis\_Crooks](https://avatars.discourse-cdn.com/v4/letter/t/3da27b/32.png) [@Travis\_Crooks](https://forum.inductiveautomation.com/u/Travis_Crooks)\
**Post date:** [January 31, 2024, 4:56pm UTC](https://forum.inductiveautomation.com/t/perspective-is-selected-text-color-setting-available-to-add-to-style-or-somewhere-in-session-props/84699/7 "2024-01-31T16:56:41Z")

</div>

Thanks for the help, the steps you outlined along with your code suggestion helped me to get it working in my project.
