AnyTool
Your files never leave your device. All processing happens locally in your browser.

How do you create a neumorphism (soft UI) effect in CSS?

Give the element the same background colour as its parent and add two box-shadows — a light highlight offset toward the light source and a darker shadow offset away from it, both with a blur about twice the offset. This generator derives those two colours by shifting the base colour’s lightness up and down, and outputs copyable CSS with a live preview.

  • One base surface colour + two box-shadows (light + dark) offset in opposite directions
  • Shadow colours are the base lightness shifted up (highlight) and down (dark)
  • Blur defaults to roughly 2× the offset distance for the soft, extruded look
  • Shape variants: flat, concave / convex (linear-gradient) and pressed (inset shadows)
  • Honest note: low contrast often fails WCAG — use sparingly and test contrast + focus

What is

Neumorphism (Soft UI)

Neumorphism, or “soft UI”, is a design style where elements share their parent’s background colour and use two subtle box-shadows — one light, one dark — to look softly extruded from or pressed into the surface, like plastic under diffuse light.

Design

Related terms

Box ShadowSoft UISkeuomorphismGlassmorphismWCAG Contrast

Frequently Asked Questions

Neumorphism is a soft-UI style: an element shares its parent’s background and uses two box-shadows — a light one and a dark one — to look gently raised or pressed.

Neumorphism (soft UI) is a design style where a component uses the same background colour as its parent and applies two box-shadows: a lighter highlight on the side facing the light source and a darker shadow on the opposite side. That pair of shadows makes the element look softly extruded from — or, with inset shadows, pressed into — the surface. The look depends entirely on low-contrast, monochrome shadows.

Convert the base colour to HSL, then make one colour lighter and one darker by the same amount — that lighter one is the highlight, the darker one is the shadow.

The algorithm converts the base surface colour to HSL and shifts its lightness up by an intensity delta to make the highlight (light) colour and down by the same delta to make the shadow (dark) colour. Because both are derived from the base, the element always blends with its parent. The highlight is offset toward the simulated light source and the dark shadow away from it, with a blur about twice the offset distance.

Usually no. Its low-contrast shadows often fail WCAG (UI components need 3:1) and give weak affordance, so use it sparingly and add clear labels and focus states.

Neumorphism has real accessibility problems. Its defining low-contrast, monochrome shadows routinely fall below WCAG’s 3:1 minimum for interactive UI components (typical edges are around 1.2–1.5:1), the soft edges give weak affordance so users cannot tell what is clickable, and a focus ring on a shadow-only element is barely visible. Use it sparingly on decorative or large controls, always test the real text and component contrast, and pair every control with a clear label, a visible focus outline and a high-contrast fallback.

Yes — it is completely free with no signup, and the CSS is generated entirely in your browser. Nothing is uploaded.

The Neumorphism Generator is free with no account or limits. Your colour and settings are just numbers and strings — the two shadow colours, offsets, blur and gradient are computed locally in your browser and never sent to a server. It works offline once cached, and copying the CSS uses your device clipboard.

Detailed Explanation

Methodology

How the Neumorphism (Soft UI) Effect Is Built

Neumorphism gives an element the same background colour as its parent and layers two box-shadows on it — a lighter highlight offset toward the simulated light source and a darker shadow offset the opposite way — so the element looks softly extruded from the surface. This generator’s engine (neumorphismEngine.ts) converts the base colour to HSL and shifts its lightness up by an intensity delta for the highlight and down by the same delta for the shadow, then computes the offsets from a single distance value with a blur that defaults to roughly twice that distance.

  • Two box-shadows on one element: light highlight + dark shadow, opposite offsets
  • Shadow colours = base HSL lightness shifted up (light) and down (dark) by intensity
  • Blur defaults to ~2× the offset distance for the soft extruded look
  • The element and its parent must share the base background colour
  • Deterministic and pure — same inputs always yield the same CSS
Use Cases

Shape Variants: Flat, Concave, Convex and Pressed

Beyond a flat raised surface, the generator produces three more shapes. Concave and convex add a subtle diagonal linear-gradient to the background — aligned to the light source — to fake inward or outward curvature, while pressed switches the two box-shadows to inset so the element looks sunken into the surface (useful for an active or “toggled on” state). The light-source corner is adjustable, which flips the sign of both offsets so the highlight always faces the light.

  • Flat: plain raised surface (background = base colour)
  • Concave / convex: a gentle linear-gradient fakes curvature
  • Pressed: inset box-shadows for a sunken / active look
  • Light source can sit in any of the four corners
Limitations

The Accessibility Trade-off (Read This Before You Ship It)

Neumorphism’s defining trait — low-contrast, monochrome shadows on a single base colour — routinely fails WCAG contrast requirements. WCAG 2.2 asks for 3:1 for interactive UI components and 4.5:1 for body text, yet a typical neumorphic edge lands around 1.2–1.5:1. The soft edges also give weak affordance (users cannot tell what is clickable) and a focus ring on a shadow-only element is barely visible. The tool computes the actual WCAG edge contrast live and warns when it drops below 3:1. Use neumorphism sparingly on decorative or large controls, always test real contrast, and add clear labels, visible focus outlines and high-contrast fallbacks.

  • UI components need 3:1 contrast; neumorphic edges are often ~1.2–1.5:1
  • Weak affordance — buttons look identical to non-interactive surfaces
  • Focus rings on shadow-only elements are hard to see for keyboard users
  • Renders differently across screens, browsers and colour profiles
  • The tool shows live WCAG edge contrast and flags the 3:1 threshold
Privacy & Security

Why It Is Private by Design

Everything happens on the user’s device. The base colour is parsed, the two shadow colours are derived, and the CSS is serialized entirely in the browser tab — there is no server call and no CDN for processing. The colour and slider values are just numbers and strings; nothing is uploaded, logged or stored. The output is plain CSS text copied to the clipboard, and the tool works offline once loaded.

  • Colours and CSS are computed entirely in the browser — no upload, no CDN, no server
  • Colour math uses the bundled culori library locally
  • Output is plain CSS text copied locally to the clipboard
  • Works offline after first load; nothing is stored server-side
Neumorphism shape variants at a glance
ShapeBackgroundBox-shadowReads as
FlatPlain base colourTwo outer shadows (light + dark)A softly raised, flat surface
ConcaveDiagonal linear-gradient (darker toward light)Two outer shadowsA surface scooped inward
ConvexDiagonal linear-gradient (lighter toward light)Two outer shadowsA surface bulging outward
PressedPlain base colourTwo inset shadowsAn element sunken into the surface

All variants derive the two shadow colours from the base colour’s HSL lightness (shifted up for the highlight, down for the shadow). The parent element must share the base colour for the effect to blend. Contrast is intentionally low, so verify WCAG contrast and focus visibility. As of July 2026.