# Is there a way to detect dark mode usage?

**URL:** <https://meta.discourse.org/t/is-there-a-way-to-detect-dark-mode-usage/261821>\
**Category:** Development\
**Created:** [April 16, 2023, 2:45am UTC](https://meta.discourse.org/t/is-there-a-way-to-detect-dark-mode-usage/261821 "2023-04-16T02:45:02Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![ti0](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ti0/32/184402_2.png) [@ti0](https://meta.discourse.org/u/ti0)\
**Post date:** [April 16, 2023, 2:45am UTC](https://meta.discourse.org/t/is-there-a-way-to-detect-dark-mode-usage/261821/1 "2023-04-16T02:45:02Z")

</div>

Is there a way in a plugin / theme component to detect if the current theme is using dark mode?  
Alternately, is there a way to get the active theme ID?  
Or should we create different theme components for light themes and dark themes?

---

_[View the full topic](https://meta.discourse.org/t/is-there-a-way-to-detect-dark-mode-usage/261821)._
