Token HUD Indicator
What it shows
Section titled “What it shows”Right-clicking a token opens its HUD. When Show TokenHUD is on, a coloured icon appears in the HUD’s right panel for the token’s current lighting condition:
| Condition | Icon | Colour | Source value |
|---|---|---|---|
| Bright | Sun (fas fa-sun) | Gold (rgb(255 215 0)) | flags.tokenlightcondition.lightLevel = 'bright' |
| Dim | Filled moon (fas fa-moon) | Silver (rgb(192 192 192)) | flags.tokenlightcondition.lightLevel = 'dim' |
| Dark | Outlined moon (far fa-moon) | Grey (rgb(102 102 102)) | flags.tokenlightcondition.lightLevel = 'dark' |
The badge is a disabled <button> element with id light-level-indicator-icon and CSS classes control-icon token-light-condition <condition>. Tooltip text is Light Level: Bright, Light Level: Dim, or Light Level: Dark depending on the current condition.
If a token’s HUD opens with a stale indicator from a previous selection, the element is removed and re-created with the current condition.
Who sees it
Section titled “Who sees it”Both GMs and players see the badge. The displayed condition is read from flags.tokenlightcondition.lightLevel on the actor, which the GM client writes and Foundry replicates to all connected clients.
For players, this means the indicator can briefly lag a movement until the GM client has finished the recalculation and flag update.
When it does not appear
Section titled “When it does not appear”The badge is suppressed if any of the following are true:
- The world
enablesetting is off (toolbar toggled off). - The client setting Show TokenHUD is off for the user.
- The selected token’s actor type is not
characterornpc. - The actor’s current HP is not greater than 0.
- More than one token is selected and the HUD-opened token cannot be resolved (multi-select uses the token the HUD was triggered for).
Customising the colours
Section titled “Customising the colours”The colour rules live in styles/tokenlightcondition.css and use a single nested .control-icon.token-light-condition selector with &.bright, &.dim, &.dark modifiers. Override them in a world stylesheet or another module’s CSS by matching the same selectors.