Tools/Css Tools/Neumorphism CSS Generator

Neumorphism Generator – Soft UI Shadow CSS with Live Preview

Generate soft UI neumorphism CSS effects online free with a live preview. Pick a background color and adjust blur, distance, and radius to create Flat, Concave, Convex, or Pressed button and card styles.

If this tool isn’t working as expected, please take a screenshot of the error and report the problem here so we can investigate and improve it.

About this tool

Neumorphism's distinctive raised-surface effect requires two precisely calibrated box shadows - one lighter than the background, one darker - at opposite corners. Getting the values right manually requires understanding the relationship between background color and shadow colors.

This tool calculates both shadow colors automatically from whichever background color you pick.

Pick a background color and adjust Blur, Distance, and Radius, then choose Flat, Concave, Convex, or Pressed to generate the matching box-shadow CSS. The light and dark shadow colors are calculated automatically from your background color, and the light source is always fixed to the top-left corner - it isn't a control you can change.

How to Use Neumorphism CSS Generator

Set Properties

Pick a background color, then adjust blur, distance, and radius.

Choose Shape

Toggle between flat, concave, convex, and pressed styles - one at a time.

Live Preview

See the neumorphic element update as you adjust sliders.

Copy CSS

Copy the CSS for the currently selected shape - switch shapes and copy again for another state.

Common Workflows

Pick a Background Color

Choose a color with the picker - the two shadow colors (light and dark) are calculated automatically from it.

Adjust Blur, Distance, and Radius

These three sliders control the shadow softness, offset, and the element's corner rounding.

Choose a Shape

Click Flat, Concave, Convex, or Pressed - each recalculates the box-shadow (and, for Convex, the background) for that state.

Copy the Current Shape's CSS

Copy captures only the shape currently selected - repeat for each additional state you need.

Best For

  • Four shapes - Flat, Concave, Convex, Pressed - each producing a different box-shadow (and, for Convex, a different background gradient); switch between them with one click and copy whichever CSS you need.
  • Background color, Blur, Distance, and Radius are the four adjustable values - light/dark shadow colors are computed automatically from your background, and the light direction is always fixed top-left/bottom-right.
  • Copy gives you the CSS for whichever single shape is currently selected - not all four states at once. Switch shapes and copy again to get another state's CSS.

Examples

Distance does nothing when Pressed is selected

Input

Shape: Pressed, Distance: 30 vs. Distance: 5

Result

Identical output either way: box-shadow: inset 4px 4px {blur/2}px {dark}, inset -4px -4px {blur/2}px {light};

The Pressed shape uses a hardcoded 4px offset regardless of the Distance slider - only Blur (via blur/2) and the background color affect its shadow.

Flat and Convex use the same shadow math - only the background differs

Input

Same Blur/Distance/Radius/Background, Shape: Flat vs. Shape: Convex

Result

Identical box-shadow value in both; Flat's background is the flat color, Convex's background becomes a 145deg gradient from the light shadow color to the dark one

The two shapes are visually different only because Convex swaps the solid background for a gradient - the box-shadow declaration itself is calculated identically.

Light and dark shadow colors are always ±40 per RGB channel

Input

Background: #e0e0e0

Result

Light shadow: rgb(224+40, 224+40, 224+40) clamped to 255; Dark shadow: rgb(224-40, 224-40, 224-40)

The lighten/darken amount is a fixed 40 per channel, clamped at 0 and 255 - it isn't adjustable, so very light or very dark backgrounds compress toward less shadow contrast rather than erroring.

Use Cases

Getting correct shadow math without doing it by hand

Pick a background color and let the tool calculate the light and dark shadow values.

Comparing all four shapes against the same background

Click through Flat, Concave, Convex, and Pressed to see which reads best before copying.

Building a raised-and-pressed button pair

Copy the Flat (or Convex) CSS for the resting state, then switch to Pressed and copy again for the active state.

Common Mistakes

Problem

Expecting the Distance slider to affect the Pressed shape

Solution

It doesn't - Pressed always uses a fixed 4px offset; only Blur and the background color change its output.

Problem

Expecting one Copy to capture both raised and pressed CSS

Solution

Copy only captures the currently selected shape - you need to switch shapes and copy again for each state.

Problem

Expecting a light-direction control

Solution

There isn't one - the light is always top-left, dark is always bottom-right, for every shape.

Problem

Picking a near-white or near-black background and expecting normal contrast

Solution

The lighten/darken amount is fixed and clamped - very light backgrounds can't get much lighter, and very dark backgrounds can't get much darker, so the raised effect gets subtler at the extremes.

Tips & Best Practices

Stick to mid-range gray backgrounds for the classic look

Colors like #e0e0e0 give the shadow math room to lighten and darken in both directions.

Copy each shape you need separately

There's no combined output - grab the Flat/Convex CSS, then switch to Pressed and copy again.

Don't rely on shadow alone to show interactive state

Since the tool has no built-in contrast checking and neumorphic shadows are inherently low-contrast, pair the effect with a visible focus style or other indicator in your own CSS.

Use Convex when you want a gradient background

It's the only shape that changes the background from solid to a diagonal light-to-dark gradient.

Limitations

No separate intensity control

"Distance" and "intensity" are the same single slider in this tool - there's no second control for shadow strength.

Fixed light direction

Light is always top-left, dark always bottom-right - this isn't adjustable for any shape.

Distance doesn't affect the Pressed shape

Pressed uses a hardcoded 4px offset regardless of the Distance slider's value.

One shape's CSS at a time

Copy only captures the currently selected shape - not a combined raised-and-pressed stylesheet.

No spread control

The box-shadow output never includes a spread value.

No presets, dark mode, or export formats beyond plain CSS

Only a Copy button exists - no Tailwind/SCSS/CSS-variable output, no download, and no reset.

No built-in contrast or accessibility checking

The tool doesn't warn you about low-contrast combinations - the accessibility trade-off inherent to neumorphism applies regardless of the values you pick.

Comparisons

This Tool vs. a Light-Direction-Adjustable Neumorphism Generator

Both calculate neumorphic shadows from a background color, but only one lets you change where the light comes from.

This Tool (Fixed Top-Left Light)A Light-Direction-Adjustable Generator
Light directionFixed top-left/bottom-rightUsually adjustable
Combined raised + pressed outputOne shape at a timeSometimes both at once
Contrast/accessibility warningsNoneOccasionally included

FAQs

The most common question is about accessibility. Neumorphic designs often fail contrast ratio requirements - the subtle shadow differences that define the style are hard for users with low vision to distinguish. Use neumorphism as an aesthetic layer on top of accessible component structure, not as the sole indicator of interactive elements. This tool has no built-in contrast checking - the accessibility trade-off is the same regardless of the values you choose.

Can I change the light direction, or get both raised and pressed CSS at once?

No. The light is always fixed top-left, dark bottom-right, for every shape - there's no direction control. Copy also only captures whichever single shape (Flat, Concave, Convex, or Pressed) is currently selected - switch shapes and copy again to get another state's CSS.

Does the Distance slider affect every shape equally?

No. Distance controls the shadow offset for Flat, Concave, and Convex - but the Pressed shape uses a hardcoded 4px offset regardless of the Distance slider's value. Only Blur and your background color affect Pressed's shadow.

What is neumorphism?

Neumorphism (New Morphism, or Soft UI) is a design style where elements appear to extrude from or press into the background surface - creating a raised or recessed appearance. Achieved through two box shadows of opposite tones (one lighter, one darker than the background) at opposite corners. Popularized around 2020 as an evolution from flat and material design - combining flat design's minimalism with skeuomorphism's tactile feel.

How is neumorphism different from glassmorphism?

Neumorphism: elements appear to be part of the background surface - raised or recessed. Effect created with light and dark box shadows. Works best on single-color backgrounds. Glassmorphism: elements appear as floating glass panels above the background. Effect created with transparent background and backdrop-filter blur. Works best on colorful or image backgrounds. Both are aesthetic trends rather than accessibility-first design approaches.

What CSS creates a neumorphic raised button effect?

Two box shadows are required - one lighter than the background (top-left) and one darker (bottom-right). For a #e0e5ec background: box-shadow: 6px 6px 12px #b8bec7, -6px -6px 12px #ffffff; - creates a raised appearance. For a pressed state (inset): box-shadow: inset 6px 6px 12px #b8bec7, inset -6px -6px 12px #ffffff; The shadow colors must be derived from the background color for the illusion to work. This tool calculates both shadow colors automatically (a fixed ±40 per RGB channel) from whichever background color you choose.

Why does neumorphism fail accessibility standards?

Neumorphic designs have inherently low contrast - the visual differentiation between interactive and non-interactive elements, or between active and inactive states, relies on subtle shadow differences that many users cannot distinguish. WCAG 2.1 requires a 3:1 contrast ratio for UI component boundaries (4.5:1 for text). Neumorphic shadows typically fail these ratios. The pressed vs raised state distinction is also non-obvious for users with low vision. This tool has no built-in contrast checking - the trade-off applies regardless of the values you pick.

What background colors work best for neumorphism?

Neumorphism requires a specific background color - typically a mid-range gray (#e0e5ec is the classic example). The two shadows are calculated as lighter and darker versions of the base background. Pure white (#ffffff) backgrounds cannot have a lighter shadow. Pure black backgrounds cannot have a darker shadow. The sweet spot is gray in the range #d0d0d0 to #f0f0f0. Colored neumorphism works but requires calculating the tinted shadow variants correctly. This tool doesn't warn you if you pick an extreme background - the lighten/darken math simply clamps at white or black, producing a subtler effect.

Get more tools like this

Leave your email so we can prioritize similar tools and updates.

Trending Tools

Trending tools will appear as visitors explore the catalog.

Recently Used

Your recently visited tools will show up here.