ٹیکسٹ شیڈو جنریٹر

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

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

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

text-shadow ایک x فاصلہ، ایک y فاصلہ، ایک دھندلاہٹ کا رداس اور ایک رنگ لیتا ہے، اور ایک عنصر کوما سے جدا کئی سائے اٹھا سکتا ہے، جو پیچھے سے آگے کی طرف بنائے جاتے ہیں۔ یہی تہہ بندی وہ چیز ہے جس سے پہلے سے طے شدہ انداز فائدہ اٹھاتے ہیں: خاکہ چار سخت نقلیں ہیں جو چاروں ترچھی سمتوں میں دھکیلی گئی ہیں، نیون کی چمک ایک ہی جگہ پر بڑھتی ہوئی دھندلاہٹ کے ساتھ تین نقلیں ہیں، اور پرانی وضع کا تاثر تین نقلیں ہیں جو گھٹتی ہوئی دُھندلی رنگت کے ساتھ قدم بہ قدم دور ہٹتی ہیں۔

رنگ اور دُھندلاہٹ کو الگ رکھنے کے بجائے ایک rgba قدر میں ملا دیا جاتا ہے، کیونکہ پوری شدت کا سایہ تقریباً کبھی مطلوب نہیں ہوتا۔ پہلے سے طے شدہ انداز ان سلائیڈروں کو نظر انداز کر دیتے ہیں جو وہ استعمال نہیں کرتے — خاکہ دھندلاہٹ کو ساخت کے اعتبار سے نظر انداز کرتا ہے، اور نیون کی چمک فاصلوں کو، کیونکہ جو چمک ایک طرف کھسکی ہو وہ سایہ ہے۔ پیش منظر کے تختے کا اپنا پس منظری رنگ ہے، کیونکہ سایہ اسی سطح پر درست پڑھا جاتا ہے جس پر وہ واقعی بیٹھے گا۔

عبارت کو پڑھنے کے قابل رکھنا

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

Four values, and a list

A text shadow takes an x offset, a y offset, a blur radius and a colour. Unlike box-shadow there is no spread — text has no box to grow.

The property accepts a comma-separated list painted back to front, and that is where every effect beyond a plain drop shadow comes from. An outline is four hard copies pushed to the four diagonals. A neon glow is three copies at the same position with increasing blur. A retro stack is three copies stepping away at decreasing opacity.

The [msm_tool slug="text-shadow-generator"] builds those stacks, but knowing they are just layered copies is what lets you adjust them afterwards.

A shadow is not contrast

This is the belief worth correcting, because it is widespread and it fails people.

Contrast, as the accessibility guidelines measure it, is the ratio between the text colour and the background colour behind it. A shadow is not part of that calculation at all. Text that fails contrast without a shadow still fails with one, however much more readable it looks to you.

That does not make shadows useless over images — they genuinely help legibility in practice. It means they are not a substitute for meeting the ratio. If the text needs to pass, put a panel or a scrim behind it and let the shadow do the finishing rather than the work.

Blur costs more than offset

A hard shadow — offset with no blur — is cheap to paint. A large blurred one is not, and multiplying it across several copies, as the neon preset does, multiplies the cost.

It matters because text shadows repaint on every scroll frame. One glowing headline is fine. A list of forty items each carrying a three-layer glow will feel less smooth than the same list without, and noticeably so on a phone.

The outline is an approximation

Four hard copies at the diagonals give the impression of a stroke, and at headline weight the impression holds up well. It is not the same as a real stroke.

The gaps show at large sizes and on thin typefaces, where the four copies leave small notches on tight curves. If you need a true outline, -webkit-text-stroke is the property for it, with the caveat that it strokes on the centre of the glyph edge rather than outside it, which thins the letterform slightly.

For most headings over photographs, the four-copy version is the more reliable choice.

Judge it at the shipping size

A two-pixel offset that reads as deliberate on a 64-pixel headline is invisible at body size, and a blur tuned on a large preview looks like a smudge on a caption.

Shadows do not scale with the text, because their values are absolute lengths. If the same class is used at two sizes, the shadow will be wrong at one of them. Either set the shadow per size, or express the offsets in em so they scale with the font.

What each preset is actually for

  • Soft drop — text over photographs. A small offset and a moderate blur at low opacity. The most useful of the set and the one that should be subtle enough that nobody notices it.
  • Outline — text that must survive an unpredictable background. Blur does nothing here by design; the offset controls the thickness.
  • Neon — zero offset, large blur, saturated colour. A glow is a shadow with no direction. Effective on dark backgrounds and almost never on light ones.
  • Retro stack — several offset copies at decreasing opacity, giving depth. Decorative; use on display type and not on anything anyone has to read at length.

Where not to use one

Body copy. A shadow on paragraph text at reading size adds a faint halo to every glyph and makes a page harder to read rather than easier, and the effect compounds over hundreds of words.

Reserve shadows for headings, captions over images, and display type — the places where a single line has to hold its own against something behind it.

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

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

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

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