# How to retrieve "Site Sizes" from my custom node source code

**URL:** <https://discourse.nodered.org/t/how-to-retrieve-site-sizes-from-my-custom-node-source-code/9681>\
**Category:** Dashboard\
**Created:** [2 April 2019 07:41 UTC](https://discourse.nodered.org/t/how-to-retrieve-site-sizes-from-my-custom-node-source-code/9681 "2019-04-02T07:41:25Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 September 2019 17:05 UTC](https://discourse.nodered.org/t/how-to-retrieve-site-sizes-from-my-custom-node-source-code/9681/22 "2019-09-29T17:05:17Z")

</div>

@BartButenaers  
that was back in April so... err so I would thing 2.15.0 ? probably ?  
The theme call gets the current theme. I think disabled is just transparent (opacity 0.5) or #808080 or something like that so that it works on both light and dark themes.

> <https://github.com/node-red/node-red-dashboard/blob/master/src/theme.less>

2.16.0 also adds the ui.isDark() call that returns true/false if the overall theme is dark (or light) - so the widget can switch locally.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [29 September 2019 17:16 UTC](https://discourse.nodered.org/t/how-to-retrieve-site-sizes-from-my-custom-node-source-code/9681/23 "2019-09-29T17:16:26Z")

</div>

> [@dceejay](#):
>
> I think disabled is just transparent (opacity 0.5

Makes sense. Didn't knew it worked like that. Thanks!

> [@dceejay](#):
>
> 2.16.0 also adds the ui.isDark() call that returns true/false

But then the 3 widget colors also switch to a darker value I hope/assume? It is for our UI contextmenu node. We would like to show the menu items in the current theme colors. So I hoped we had enough by getting the widgetTextColor / widgetBackgroundColor / widgetBorderColor (combined with the opacity for disabled menu items).

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 September 2019 17:43 UTC](https://discourse.nodered.org/t/how-to-retrieve-site-sizes-from-my-custom-node-source-code/9681/24 "2019-09-29T17:43:52Z")

</div>

If you are using the standard styles then yes you will get the theme colours in use at that time. The isDark() is useful if you had your own style you needed to switch ( like the table tabulator library)

[Previous page](https://discourse.nodered.org/t/how-to-retrieve-site-sizes-from-my-custom-node-source-code/9681.md?page=1)
