# Color-Change Night Mode

**URL:** <https://forums.ankiweb.net/t/color-change-night-mode/36164>\
**Category:** Help\
**Created:** [October 25, 2023, 7:24am UTC](https://forums.ankiweb.net/t/color-change-night-mode/36164 "2023-10-25T07:24:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark12345](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@Mark12345](https://forums.ankiweb.net/u/Mark12345)\
**Post date:** [October 25, 2023, 7:24am UTC](https://forums.ankiweb.net/t/color-change-night-mode/36164/1 "2023-10-25T07:24:53Z")

</div>

Hi Community.

I would love to set the color for one field of my cards to a different color in Night Mode than in Day Mode.  
I would love to use LightGrey for Day Mode and Gray for Day Mode.

How can I do that?

Thank you.

---

<div class="post-metadata">

**Author:** ![jcznk](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/jcznk/32/15215_2.png) [@jcznk](https://forums.ankiweb.net/u/jcznk)\
**Post date:** [October 25, 2023, 1:12pm UTC](https://forums.ankiweb.net/t/color-change-night-mode/36164/2 "2023-10-25T13:12:26Z")

</div>

To achieve that, you need to edit the [Card Template](https://docs.ankiweb.net/templates/intro.html) of your notes.

A possible approach could be:

Front/Back template:

```auto
<span class="myClass">{{Field}}</span>

```

Styling section:

```auto
.myClass {color: grey;}
.night_mode .myClass {color: lightgrey;}

```

---

<div class="post-metadata">

**Author:** ![Mark12345](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@Mark12345](https://forums.ankiweb.net/u/Mark12345)\
**Post date:** [October 25, 2023, 6:08pm UTC](https://forums.ankiweb.net/t/color-change-night-mode/36164/3 "2023-10-25T18:08:36Z")

</div>

Thank you so much for your help 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [November 24, 2023, 6:09pm UTC](https://forums.ankiweb.net/t/color-change-night-mode/36164/4 "2023-11-24T18:09:04Z")

</div>

Closed on November 24, 2023, 6:09pm UTC

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