بلاب جنریٹر

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

CSS والا راستہ آٹھ اقدار والا border-radius شارٹ ہینڈ استعمال کرتا ہے، جو عنصر کے کسی بھی حجم پر لچکدار رہتا ہے مگر صرف چار کونے موڑ سکتا ہے — یہ حقیقی لہریا شکل نہیں بنا سکتا۔ SVG والا راستہ دائرے کے گرد مختلف رداسوں پر نقطے رکھتا ہے اور انہیں ایک بند Catmull-Rom منحنی سے جوڑ کر کیوبک Bézier میں بدل دیتا ہے، اس لیے خاکہ ہموار رہتا ہے اور جوڑ کا کوئی نشان نہیں بنتا۔ جہاں شکل کو مواد کے ساتھ بڑھنا ہو وہاں CSS استعمال کریں، اور جہاں خاکے کی صورت اہم ہو وہاں SVG۔

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

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

خم Catmull-Rom کے کنٹرول نقطوں کو مکعب Bézier ٹکڑوں میں بدل کر بنایا جاتا ہے، اس لیے راستہ ہر لیے گئے نقطے سے گزرتا ہے اور وہاں بند ہوتا ہے جہاں سرے ملتے ہیں، بغیر کسی نظر آنے والے جوڑ کے۔ بے قاعدگی کی ترتیب طے کرتی ہے کہ ہر نقطہ بنیادی رداس سے کتنا ہٹے، اور نقطوں کی تعداد بتاتی ہے کہ کتنے نقطے لیے جائیں — اتنی ہی بے قاعدگی پر زیادہ نقطے زیادہ مصروف اور کم گول خاکہ دیتے ہیں۔ ہر بار نئی شکل اتفاقی ہوتی ہے، اس لیے وہی ترتیبات ہر بار مختلف لوندا بناتی ہیں۔

دونوں آؤٹ پُٹ میں سے چننا

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

Two outputs, two different techniques

The [msm_tool slug="blob-generator"] produces the same idea two ways, and they are not interchangeable.

The CSS form is a border-radius shorthand with eight values — four horizontal radii, then four vertical ones after a slash. Splitting them lets each corner be elliptical rather than circular, and that alone is enough to make a rectangle read as an organic lump. Because the values are percentages, the shape scales with the element and reflows with the layout.

The SVG form samples points around a circle at varying radii and joins them into a closed curve. It is a real path, so it can do things eight radii cannot.

The CSS form cannot curve inward

This is the limit worth understanding before choosing. border-radius rounds corners inward from the box; it has no way to push an edge in toward the centre. Every CSS blob is therefore convex — a rounded rectangle with uneven corners, however irregular it looks.

If you want a genuine inlet, a pinch, or an asymmetric bulge, that needs a path, which is what the SVG output is for.

How the SVG curve is built

Points are sampled at intervals around a circle, each pushed in or out by a random amount, and then joined with cubic Bézier segments derived from Catmull-Rom control points. That last part is why it matters: a Catmull-Rom spline passes through every sampled point rather than near them, and it closes without a visible seam where the ends meet.

Joining random points with straight lines gives a polygon. Joining them with naive curves gives a shape with a kink where it closes. This is the reason the outputs look organic rather than lumpy.

More points means busier, not smoother

The instinct is that more sample points produce a smoother curve. The opposite is true at a fixed irregularity: more points means more places for the outline to deviate, so the shape reads as busier and less rounded.

For the soft background shapes these are usually used for, five to eight points with moderate irregularity is the useful range. Twenty points produces something closer to a splash than a blob.

Every regeneration is random

There is no seed and no history. The settings alone will not reproduce a shape you liked — copy the CSS or the SVG the moment you see one you want.

That is worth saying plainly because it is the most common frustration with any generator of this kind. Two blobs generated from identical settings are different blobs.

Where each output belongs

  • CSS — a decorative shape on an element that resizes: an avatar frame, a section background, a hover state on a card. It costs nothing, needs no extra markup, and adapts to any dimensions.
  • SVG — a background illustration, a masked photograph, anything needing concave edges. It is a fixed path, so it will distort if stretched to a very different aspect ratio unless the viewBox is handled properly.

The layout still uses the rectangle

Whichever form you use, the element occupies its full box. A blob applied as a clip path does not make surrounding text flow around the curve — content flows around the rectangle, exactly as it does for any clipped element.

If text should follow the shape, that is shape-outside, which takes similar values and does a different job.

Restraint

Blobs became ubiquitous around 2019 and are now firmly dated when overused. One as a background accent behind a hero section reads as considered. Four of them in different colours reads as a template.

They also carry no meaning, so they are decoration in the strictest sense: nothing should depend on a user perceiving one, and they need no alternative text because there is nothing to describe.

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

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

CSS والا جب شکل کسی ایسے عنصر کو سجا رہی ہو جو سائز بدلتا ہے، کیونکہ وہ فی صد پر مبنی ہے۔ SVG والا جب آپ کو اندر کو مڑے کنارے یا حقیقی بے قاعدگی چاہیے۔
ہر بار نئی شکل اتفاقی ہوتی ہے۔ جیسے ہی کوئی پسند آئے، CSS یا SVG فوراً نقل کر لیں؛ صرف ترتیبات اسے دوبارہ نہیں بنا سکیں گی۔
چار افقی رداس، پھر سلیش کے بعد چار عمودی۔ انہیں الگ کرنے سے ہر کونہ دائروی کے بجائے بیضوی ہو سکتا ہے۔
border-radius صرف ڈبے کے کونوں کو اندر کی طرف گول کر سکتا ہے۔ اندر کو مڑے کناروں کے لیے حقیقی راستہ چاہیے، اور یہی SVG کا آؤٹ پُٹ دیتا ہے۔
اتنی ہی بے قاعدگی پر اس کا الٹ۔ زیادہ نقطوں کا مطلب ہے خاکے کے پاس ہٹنے کے زیادہ مواقع، اس لیے وہ گول ہونے کے بجائے مصروف لگتا ہے۔

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