نیومورفزم جنریٹر

استعمال کا طریقہ 3 مراحل
  1. سطح کا رنگ اور عبارت کا رنگ چنیں۔
  2. سائے کا فاصلہ، شدت، بلر، انداز اور روشنی کا منبع طے کریں۔
  3. CSS کاپی کریں دبائیں اور اپنی اسٹائل شیٹ میں چسپاں کریں۔
Soft UI
اثر کے کام کرنے کے لیے عنصر اور اس کا پس منظر ایک ہی رنگ کے ہونے چاہئیں۔
تیار کردہ CSS

رسائی کی تنبیہ دکھائی جاتی ہے، چھپائی نہیں جاتی۔ Soft UI کسی کنٹرول اور اس کے پس منظر کے درمیان کنٹراسٹ ختم کر کے کام کرتا ہے، اور بالکل یہی چیز WCAG 1.4.11 تعاملی عناصر کے لیے لازم کرتا ہے: ملحقہ رنگوں کے مقابل 3:1۔ پیش منظر کے نیچے کنٹراسٹ کی قدر اصل عدد بتاتی ہے، اور یہ عموماً ناکام ہوگا۔ اسے سجاوٹ کے لیے استعمال کریں، یا جس چیز پر کسی کو کلک کرنا ہو اس پر نظر آنے والا حاشیہ یا فوکس رنگ لگائیں۔

یہ ٹول کیسے کام کرتا ہے

پورا تاثر ایک ہی اصول پر کھڑا ہے: عنصر اور اس کا والد ایک ہی رنگ کے ہونے چاہئیں۔ دو سائے مخالف کونوں پر رکھے جاتے ہیں، ایک سطح سے ہلکا اور ایک گہرا، اور ابھری یا دبی ہوئی تختی کا دھوکہ انہی دو کناروں سے پیدا ہوتا ہے۔ والد کا رنگ بدل دیں تو سائے روشنی کی طرح پڑھے جانے کے بجائے دو رنگین دھبے بن جاتے ہیں۔

ہلکا اور گہرا سایہ آپ کی سطح کے رنگ کو مقررہ شدت کے مطابق سفید اور سیاہ کی طرف کھسکا کر بنائے جاتے ہیں، اور روشنی کے منبع کا اختیار یہ بدلتا ہے کہ کون سا سایہ کس کونے پر ہو۔ دبی ہوئی شکل دونوں سائے عنصر کے اندر لے جاتی ہے؛ مقعر اور محدب سپاٹ پس منظر کی جگہ ایک ہلکا گریڈینٹ رکھ دیتے ہیں جو روشنی کے ساتھ یا اس کے خلاف چلتا ہے۔ بنا ہوا CSS والد کا قاعدہ بھی شامل رکھتا ہے، کیونکہ اسے چھوڑ دینا ہی اس تاثر کے ناکام ہونے کی سب سے عام وجہ ہے۔

رسائی کا مسئلہ، صاف الفاظ میں

  • کنٹراسٹ کا اعداد ہی اصل آؤٹ پُٹ ہے: نیومورفک کنٹرول کا کنارہ اکثر اس 3:1 کی حد سے نیچے ہوتا ہے جو غیر متنی انٹرفیس عناصر کو پوری کرنی چاہیے، اور CSS کے ساتھ چھپا ہوا عدد بتا دیتا ہے کہ آپ کا کہاں ہے۔
  • نرم کنارہ کمزور اشارہ ہے: اگر کسی بٹن کو بٹن ظاہر کرنے والی واحد چیز ایک مدھم سایہ ہو، تو کم بینائی والے، مدھم اسکرین پر یا کھلی دھوپ میں بیٹھے لوگ اسے نہیں پائیں گے۔ ساتھ کوئی لیبل، خاکہ یا رنگ کی تبدیلی بھی رکھیں۔
  • دبی اور ابھری حالت میں فرق گہرائی سے زیادہ کسی چیز سے ہونا چاہیے: ایسا ٹوگل جس کی دونوں حالتوں میں فرق صرف سائے کی سمت ہو، اس شخص کے لیے سرے سے غائب ہے جو سایہ دیکھ ہی نہیں سکتا۔
  • یہ صرف سپاٹ سطح پر کام کرتا ہے: تصویر، گریڈینٹ یا نمونے والے پس منظر پر دونوں سایوں کے پاس بیٹھنے کو کوئی یکساں بنیاد نہیں رہتی اور دھوکہ ٹوٹ جاتا ہے۔

The whole effect rests on one rule

The element and its parent must be the same colour.

Neumorphism works by placing two shadows on opposite corners — one lighter than the surface, one darker — so the element appears extruded from the background rather than floating above it. Shift the parent to a different colour and the shadows stop reading as light and become two coloured smudges.

That is why the [msm_tool slug="neumorphism-generator"] emits the parent rule alongside the element rule. Omitting it is the commonest way the effect fails when pasted into a real page.

The accessibility problem, stated plainly

This is not a caveat to mention in passing. It is the defining constraint of the style.

Interface elements that convey meaning — buttons, inputs, borders, focus rings — are expected to meet a contrast ratio of 3:1 against what surrounds them. A neumorphic edge is a soft shadow against a surface of the same colour, and it routinely falls well below that. Which is to say: for a proportion of your users, the button is not visibly a button.

The generator prints the contrast figure with the CSS for exactly this reason. If it reads below 3:1, the control does not meet the bar, and no amount of adjusting the light source will change that — the shadows are the whole design.

What actually fails

  • Low vision. A faint edge is the first thing to disappear.
  • Bright environments. Outdoors on a phone, subtle shadows vanish entirely. The screen is at its brightest and the contrast between surface and shadow is the first casualty.
  • Poor displays. Cheap panels and older screens crush the near-identical greys the effect depends on.
  • State changes. A toggle whose only difference between on and off is which way the shadow falls is invisible to anyone who cannot see the shadow at all.

Using it without failing people

The style is not unusable. It is unusable as the only signal. Three things make it survivable:

  1. Add a second cue to every control. A label, an icon, a border, a colour change on hover and focus. If the shadow were removed entirely, could someone still tell this is a button and what state it is in? If not, the design depends on something a lot of people cannot see.
  2. Keep a real focus ring. Neumorphic designs frequently remove outlines because they interrupt the soft aesthetic. A keyboard user with no visible focus indicator cannot use the page at all. Use :focus-visible and give it genuine contrast.
  3. Use it for surfaces, not controls. Cards, panels and containers can carry the style safely, because nothing depends on the user identifying them as interactive. Reserve conventional styling for the buttons and inputs.

Pressed, concave and convex

The pressed shape moves both shadows inside the element with the inset keyword, which is how a recessed control is drawn. Concave and convex replace the flat background with a shallow gradient running against or with the light — the face appears to dish inward or bulge outward.

The same rule applies to all of them: pair the depth change with something else. A pressed state that differs only in shadow direction is a state change many users will not perceive.

It only works on a flat surface

Over an image, a gradient or a patterned background, the two shadows have nothing consistent to sit against and the illusion collapses. Neumorphism is a style for plain single-colour pages, which is part of why it tends to arrive as a whole-site aesthetic rather than a component choice.

An honest summary

Neumorphism looked new in 2020 and has aged into something more like a specimen. It is pleasant on a dribbble shot and difficult in production, for a reason that is structural rather than fashionable: the effect works by minimising contrast, and interfaces work by having enough of it.

If you want the softness without the cost, a very subtle conventional shadow on a light card gives most of the feel with an edge people can actually see.

اکثر پوچھے گئے سوالات

خاص طور پر نیومورفزم جنریٹر کے بارے میں۔ اس زمرے سے متعلق عمومی سوالات کے جواب زمرے کے صفحے پر موجود ہیں۔

والد عنصر کا پس منظر تقریباً یقیناً مختلف ہے۔ عنصر اور اس کے ڈبے کا رنگ ایک ہونا چاہیے، اسی لیے بنا ہوا CSS والد کا قاعدہ ساتھ دیتا ہے۔
اکیلا نہیں۔ کنارے اکثر 3:1 کی غیر متنی کنٹراسٹ حد سے نیچے رہتے ہیں، اور CSS کے ساتھ چھپا ہوا کنٹراسٹ عدد بتا دیتا ہے کہ آپ کا کہاں کھڑا ہے۔
دبی ہوئی شکل inset کلیدی لفظ کے ساتھ دونوں سائے عنصر کے اندر لے جاتی ہے۔ اس کے ساتھ کوئی اور نظر آنے والی تبدیلی بھی رکھیں، کیونکہ اکیلی گہرائی قابلِ بھروسہ اشارہ نہیں۔
دونوں سطح پر ایک ہلکا گریڈینٹ ڈالتے ہیں۔ مقعر اسے روشنی کے خلاف چلاتا ہے تو چہرہ اندر دھنسا لگتا ہے؛ محدب اسے روشنی کے ساتھ چلاتا ہے تو چہرہ ابھرا ہوا لگتا ہے۔
نہیں۔ اس دھوکے کو پیچھے اسی رنگ کی سپاٹ سطح چاہیے۔ تصویر پر دونوں سایوں کے پاس بیٹھنے کو کچھ نہیں ہوتا۔

نئے ٹولز، خصوصیات اور کارکردگی بڑھانے کے مشوروں کی اطلاع پانے کے لیے سبسکرائب کریں۔