Color & Effects
Lighting & Depth
Lighting & Depth gives a thing believable height with one control. Set its elevation and Nox draws a soft shadow of five layers, each further, wider and fainter than the last, the way real light falls. Add a rim and the edge that faces the light catches it. It is the fastest way to make cards, buttons and floating panels look as if they belong to one lit world, and it keeps every shadow in a design consistent.

The control#
| Field | In the tools | Range | Default | What it does |
|---|---|---|---|---|
| Elevation | elevation | 0–100 | 0 | How far the thing stands off what is under it |
| Softness | softness | 0–100 | 50 | How diffuse the shadow is |
| Tint | tint | 0–100 | 0 | How much of the thing's own color is in its shadow |
| Angle | angle | 0–360 | 0 | Where the light is, in degrees clockwise from straight above |
| Rim | rim | 0–100 | 0 | How bright the lit edge is |
| Width | rim_width | 0.5–8 | 1 | How wide the lit edge is |
| Intensity | intensity | 0–100 | 50 | How dark the shadow is: 50 is a card on a light ground, 100 twice as dark |
| Offset | offset | 0–100 | 50 | How far the shadow is cast: 0 straight under, all round; 50 a quarter of the elevation |

Some things to know about each:
- Elevation is the one to set first. Under 10 for rows and chips, about 16–24 for cards, 48–64 for menus and popovers, 80 and above for sheets and dialogs.
- Softness high reads as a large, distant light; low as a near, hard one. Keep one softness across a screen.
- Tint at 60–80 on a colored button puts its own hue in the shadow, which looks richer than gray under a saturated color.
- Angle 0 lights from above, so the shadow falls down. 90 is light from the right, so the shadow falls left.
- Rim is a white edge on the side facing the light, with a faint line all round. On a dark ground a shadow has little to darken, and the rim is what shows height: use 40–80 there.
- Intensity and Offset are for when the defaults are wrong for the ground: raise intensity on a mid-gray background, lower offset for a thing that floats straight up, such as a modal.
Set it by hand#
- Select a frame or a shape. In the inspector, open Lighting & Depth with the + at the right of its title. (Shut, its title says what the selection uses, as
· elevation 24, rim.) - Drag on a field's label to scrub it, or click the field and type. Each change is one step of undo.
- Copy SwiftUI and Copy CSS, at the foot of the section, copy the thing with its depth as code.

The shadows of a depth are not listed under Effects. They are drawn from these eight numbers, in the canvas, in every export and in the code, so they never drift from the control. You can still add your own effects beside a depth.
Give the stats card the depth of a resting card, and the Upgrade button a lifted, tinted look with a light rim.
The agent calls update_nodes:
{
"changes": [
{"id": "3:2", "depth": {"elevation": 16, "softness": 60}},
{"id": "3:3", "depth": {"elevation": 20, "softness": 40, "tint": 70, "rim": 30}}
]
}depth is given whole: a field left out goes back to its default, it is not kept from before. null removes the depth.
One light for a whole screen#
A screen looks lit when all its shadows agree about where the light is. Make that a fact rather than a habit: put the angle in a number variable and have every card follow it. Change the variable, or switch the mode, and every shadow and rim on the screen turns together.

- In Variables on the rail, add a number named
light/angle, with a value for each mode you need (see Variables and modes). - Select the cards, right-click the Angle field in Lighting & Depth, and choose the variable under Follow a Variable.
Make a Light set with Day and Night modes and a light/angle of 0 by day and 60 at night. Make the two cards follow it.
The agent calls set_variables:
{"set": "Light", "modes": ["Day", "Night"], "variables": [{"name": "light/angle", "values": {"Day": 0, "Night": 60}}]}
Then update_nodes, binding each card's angle:
{
"changes": [
{"id": "3:2", "bindings": {"depth_angle": "light/angle"}},
{"id": "3:3", "bindings": {"depth_angle": "light/angle"}}
]
}Elevation, softness, tint, angle, rim and width can each follow a variable (depth_elevation through depth_rim_width). A variable for elevation is a good way to keep one height per kind of thing: depth/card, depth/menu, depth/dialog.
Recipes#

| For | Depth | Why |
|---|---|---|
| A card on a light ground | elevation 16, softness 60 | Lifted enough to separate from the page |
| A primary button | elevation 20, softness 40, tint 70, rim 30 | Its color in the shadow, a crisp edge on top |
| A menu or popover | elevation 64, softness 80, intensity 60 | Clearly above everything, but soft and not heavy |
| A card on a dark ground | elevation 24, rim 50 | The rim does the work; the shadow barely shows |
inspect writes a depth as CSS (box-shadow, five layers and two inset ones for the rim) and SwiftUI (five .shadow modifiers and a strokeBorder along the light). Where a game needs the shadow in its texture, see Export for engines.
Use Lighting & Depth for anything that should feel raised, and keep hand-made shadows for special cases such as a colored glow or an inner shadow. See Shadows.