Neumorphism Generator

Pick a soft look, set the surface colour and the depth, and copy the CSS. The tool also measures how visible the edge is, because low contrast is this style's known weakness.

How it works

Neumorphism, or soft UI, makes a shape out of the page itself. The shape has the same colour as the surface behind it. A dark shadow on one side and a light one on the other make it look raised, as if the surface were pushed up from below and lit from the top left.

The tool works out both shadow colours from your surface colour. Intensity scales each colour channel up for the highlight and down for the shade, so a pale grey at 15% gets a pure white highlight and a soft grey shade.

Flat, Convex and Concave raise the shape; Convex and Concave add a gentle gradient so the face looks curved out or in. Pressed uses inset shadows, so the shape looks pushed into the surface.

The CSS has two rules, because the effect only works when the parent has the same background as the shape. Put the .surface rule on the container and .neu on the shape.

How to use it

  1. 1 Pick a starting look from the presets.
  2. 2 Set the surface colour to your page background.
  3. 3 Choose the shape, then adjust distance, blur, intensity and corner radius.
  4. 4 Read the edge contrast. If the shape is a button or a field, tick Add a visible border, then press Copy CSS.

Good to know

  • Mid-tone and pale surfaces work best. On pure white there is no room for a lighter highlight, and on near-black there is little room for a darker shade.
  • Keep the blur about twice the distance. Less looks hard and cut out; much more looks smudged.
  • Use the pressed shape to show that a toggle is on, and pair it with a text label or an icon. A change of shadow alone is too faint to carry meaning.
  • For cards and panels that do not need to be seen as controls, the low contrast matters less. Decoration can be quiet.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

The contrast problem with neumorphism, measured

Take the Soft grey preset. The surface and the shape are both #e0e5ec. The tool shades that colour by 15% each way: down to #bec3c9 for the shadow on the bottom right and up to #ffffff for the highlight on the top left. The CSS is box-shadow: 10px 10px 20px #bec3c9, -10px -10px 20px #ffffff. On a screen it looks soft, raised and calm, which is why the style spread quickly around 2020.

Now measure it. WCAG 2.1 success criterion 1.4.11, non-text contrast, asks that the visual information needed to identify a control, such as its edge, has a contrast of at least 3:1 against what is next to it. The darkest point of the shadow is #bec3c9, and against the #e0e5ec surface it measures 1.40:1. The highlight does worse: #ffffff against #e0e5ec is 1.26:1. And those are the strongest points; the shadow fades from there to nothing. The edge of the button is less than half as visible as the rule asks.

Turning the intensity up helps only a little, because the shadow is still a blurred fade, and most of its pixels are close to the surface colour. What does work is a border. With Add a visible border ticked, the tool steps through darker shades of #e0e5ec until one reaches 3:1, and lands on #7d8084, which measures 3.13:1 against the surface. A 1px line in that colour leaves the soft shading in place and gives the shape an edge that people with low vision can find.

The second problem is state. A neumorphic toggle often shows "on" by switching from raised to pressed. The difference between the two is a change in faint shadows, and WCAG asks for the same 3:1 for the visual change that shows a state. If a toggle must use this style, add a clear signal with it: a label that reads On or Off, a check mark, or a colour fill.

The limits. The contrast check measures the strongest part of the shadow against the surface, which is the best case; the rest of the edge is fainter. It reads hex colours only. And it cannot judge layout: a page of soft buttons with good borders may still be hard to scan if nothing else sets the primary action apart. Neumorphism works best for decoration and for surfaces people look at rather than press.

Frequently asked questions

Is neumorphism accessible?

Not on its own. The edge of a neumorphic shape is a soft shadow on a surface of the same colour, which usually measures well under the 3:1 contrast WCAG asks for the boundary of a control. People with low vision, or anyone on a dim screen in sunlight, may not see where a button is. Add a visible border or another clear cue for anything people need to find and press.

What does the visible border option do?

It adds a 1px border in a darker or lighter shade of your surface colour, the first shade that reaches 3:1 against the surface. The soft look stays, and the edge of the control becomes visible.

Why does the shadow look wrong on my page?

Because the page background differs from the shape's colour. The effect needs both to be the same colour. Use the .surface rule from the CSS on the container.

Is anything uploaded?

No. The CSS is written by code running in this page, and your browser draws the preview.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.