# La couleur de thème Meta ne respecte pas le schéma de couleurs actuel

**URL:** <https://meta.discourse.org/t/meta-theme-color-is-not-respecting-current-color-scheme/239815>\
**Category:** Bug\
**Created:** [Septembre 22, 2022, 11:57 UTC](https://meta.discourse.org/t/meta-theme-color-is-not-respecting-current-color-scheme/239815 "2022-09-22T23:57:24Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)\
**Post date:** [Novembre 8, 2022, 8:26 UTC](https://meta.discourse.org/t/meta-theme-color-is-not-respecting-current-color-scheme/239815/19 "2022-11-08T08:26:47Z")

</div>

Pour information @Don et @mk0r, cela devrait être corrigé pour de bon maintenant :

> <https://github.com/discourse/discourse/pull/18832>
>
> Meta topic: https://meta.discourse.org/t/meta-theme-color-is-not-respecting-curr…ent-color-scheme/239815
> 
> Currently, the dark mode theme-color \`\<meta\>\` tag doesn't apply because the light mode tag has \`media="all"\`. This means that the dark most \`\<meta\>\` tag with \`media="(prefers-color-scheme: dark)"\` won't override it. This PR updates the light mode tag to \`media="(prefers-color-scheme: light)"\` if \`dark\_scheme\_id\` is defined and leaves it as \`media="all"\` otherwise.
> 
> Tested by adding the following to my theme \`\<head\>\`.
> \`\`\`html
> \<script\>
> $("meta\[name='theme-color'\]\[media='all'\]").attr('media', '(prefers-color-scheme: light)');
> \</script\>
> \`\`\`

(Je ne sais pas qui est `kaden-stytch` sur Meta, mais qui que vous soyez, merci ! :meow_heart:)

---

_[View the full topic](https://meta.discourse.org/t/meta-theme-color-is-not-respecting-current-color-scheme/239815)._
