Polygon Layers
Polygon layers bring geometric precision and versatility to Component.Studio. From triangles to icosagons (20-sided shapes), polygons offer mathematically perfect regular shapes with equal sides and equal angles. Whether you're designing badges, icons, decorative elements, or complex geometric patterns, polygon layers give you the creative freedom to explore shapes beyond simple rectangles and circles. With adjustable side counts, optional rounded corners, and all the fill and border options you'd expect, polygons are powerful building blocks for sophisticated designs.
What Makes a Polygon?
In Component.Studio, polygons are regular polygons - meaning all sides are equal length and all angles are equal. The defining characteristic is the number of sides, which you can set anywhere from 3 to 20. Each polygon is drawn from its center point and oriented with one point facing upward (at the 12 o'clock position).
Common Polygon Shapes
Triangle
Perfect for arrows, direction indicators, play buttons
Diamond
Warning signs, decorative elements, gem shapes
Pentagon
Badges, shields, military/government designs
Hexagon (Default)
Tiles, honeycomb patterns, tech designs
Heptagon
Unique badges, currency designs
Octagon
Stop signs, martial arts symbols
Decagon
Decorative frames, complex patterns
High-Poly Shapes
Approaching circular appearance, gear-like patterns
Position and Size
Polygon layers use a slightly different sizing system than boxes or orbs. Instead of defining dimensions directly, you work with width and height that describe the bounding area the polygon occupies.
| Property | Description |
|---|---|
| X Position | Horizontal position in pixels from the origin point |
| Y Position | Vertical position in pixels from the origin point |
| Number of Sides | How many sides the polygon has (3-20). This fundamentally changes the shape. |
| Width | Width of the polygon's bounding area in pixels (horizontal span) |
| Height | Height of the polygon's bounding area in pixels (vertical span) |
| Rotation | Rotation angle in degrees (0-360). Rotates the entire polygon around its center. |
| Anchor | The reference point for positioning (top-left, center, etc.) |
Understanding Width and Height
Unlike circles (which use radius), polygons in Component.Studio use width and height to define their bounding box. The polygon is inscribed within this box:
- Equal dimensions (200x200): Creates a "regular" polygon where the shape fits perfectly in a square, maintaining equal proportions
- Different dimensions (300x150): Stretches the polygon horizontally or vertically, creating elongated versions
- The polygon is always centered: No matter the dimensions, the polygon centers itself within the bounding box
Fill Properties
Polygons support the complete range of fill options, from solid colors to complex gradients and textures.
Fill Types
| Fill Type | Description | Best For |
|---|---|---|
| None | No fill - transparent interior | Outline shapes, wireframe designs, geometric patterns with borders only |
| Color | Solid color fill using Fill Color 1 | Clean badges, simple icons, geometric shapes |
| Texture | Repeating image pattern from a URL | Patterned shapes, textured badges, decorative polygons |
| Horizontal | Left-to-right gradient between two colors | Directional emphasis, ribbon effects |
| Vertical | Top-to-bottom gradient between two colors | 3D shading effects, depth on shields or badges |
| Diagonal | Top-left to bottom-right gradient | Dynamic badges, modern geometric designs |
| Radial | Center-to-edge circular gradient | Dimensional effects, glowing badges, gem-like appearances |
Fill Properties
| Property | Range | Description |
|---|---|---|
| Fill Opacity | 0-100% | Controls transparency of the fill. 0 is invisible, 100 is fully opaque. |
| Fill Color 1 | Hex color | The primary color for solid fills, or the starting color for gradients |
| Fill Color 2 | Hex color | The ending color for gradient fills (horizontal, vertical, diagonal, radial) |
| Color Stop 1 | 0-100% | Position where the first color begins in the gradient (default 0) |
| Color Stop 2 | 0-100% | Position where the second color ends in the gradient (default 100) |
| Fill Texture | URL | Image URL for texture fills - the image repeats to fill the polygon |
Gradient Direction on Polygons
Gradients behave slightly differently on polygons compared to rectangles:
- Horizontal: Flows left to right across the polygon's width. On a hexagon, this creates a nice left-to-right color transition.
- Vertical: Flows top to bottom. Perfect for creating a "lit from above" effect on shields or badges.
- Diagonal: Flows from top-left to bottom-right corner of the bounding box.
- Radial: Emanates from the exact center of the polygon outward to the edges. Creates beautiful gem or button effects.
Border Properties
Borders on polygons follow the geometric edges perfectly, creating clean outlines that emphasize the polygonal shape.
Border Types
| Border Type | Description |
|---|---|
| None | No border at all |
| Color | Solid color border using the Border Color property |
| Texture | Image-based border - the image repeats along the polygon's edges |
Border Controls
| Property | Range | Description |
|---|---|---|
| Thickness | 0-9999px | Width of the border in pixels |
| Border Color | Hex color | Color of the border (when Border Type is "color") |
| Border Opacity | 0-100% | Transparency of the border. 0 is invisible, 100 is fully opaque. |
| Border Alignment | 0-100% | Where the border sits relative to the polygon edge: 0 = inside (border grows inward) 50 = center (border straddles the edge) 100 = outside (border grows outward) |
| Border Texture | URL | Image URL for texture borders |
Corner Styles
Unlike box layers which offer nine corner types, polygons keep it simple with two options: square (sharp) corners or round (smooth) corners. This simplicity makes sense because polygons are already geometric by nature.
| Corner Type | Description | Effect |
|---|---|---|
| Square | Sharp, precise corners where edges meet at exact angles | Emphasizes the geometric nature. Clean, technical, mathematical appearance. |
| Round | Smoothly curved corners with adjustable radius | Softens the shape, creates a friendlier feel, modern rounded aesthetic. |
Corner Radius
When Corner Type is set to "round", the Corner Radius property (0-100) controls how curved the corners become. The system automatically limits the radius to 40% of the edge length to prevent corners from overlapping or creating distorted shapes.
| Corner Radius Value | Effect |
|---|---|
| 0 | No rounding (same as square corners) |
| 5-15 | Subtle rounding, slightly softened edges |
| 20-40 | Moderate rounding, noticeably curved corners |
| 50-100 | Heavy rounding, very smooth flowing edges (may be clamped based on polygon size) |
Rounded Corners Transform Shapes
Adding corner radius dramatically changes the feel of polygons:
- Triangle: Sharp triangle becomes a Reuleaux triangle-like shape, perfect for rounded play buttons
- Hexagon: Sharp hexagon becomes a softer, more organic honeycomb cell
- Octagon: Approaches a circular appearance with heavy rounding
- High-sided polygons: With rounding, a 12+ sided polygon becomes almost indistinguishable from a circle
Visual Effects
Polygon layers support the complete Component.Studio effects pipeline, allowing you to add depth, glow, and visual sophistication to geometric shapes.
| Effect | Purpose |
|---|---|
| Drop Shadow | Add depth and lift the polygon off the page. Particularly effective for badge designs. |
| Color Overlay | Tint the entire polygon with a semi-transparent color. Great for quick color theming. |
| Blur | Apply gaussian blur to soften the polygon. Creates ghosted or background polygon effects. |
| Glow | Add a soft outer glow around the polygon edges. Perfect for neon effects or highlighting. |
| Outline | Add a sharp outline around the polygon silhouette. Different from borders - outlines always follow the outer edge. |
| Color Adjust | Fine-tune brightness, contrast, saturation, and other color properties. |
Badge Design Recipe
Create a professional badge using a polygon:
- Number of Sides: 6 (hexagon)
- Width: 150, Height: 150
- Fill Type: Vertical gradient
- Fill Color 1: #4488cc (light blue)
- Fill Color 2: #2266aa (darker blue)
- Border Type: Color
- Border Color: #ffffff (white)
- Border Thickness: 4
- Border Alignment: 50 (center)
- Corner Type: Round, Corner Radius: 8
- Enable Drop Shadow, Distance: 3, Blur: 8, Color: #000000, Opacity: 30
Result: A clean, professional hexagonal badge with subtle depth and modern rounded corners.
Working with Polygon Layers
Common Use Cases
Icon Shapes
Triangles make excellent play/pause buttons, direction arrows, and warning indicators. Use a 3-sided polygon at 60x60 pixels with rounded corners (radius: 8) for a friendly play button. Point it in different directions by rotating.
Geometric Badges and Labels
Hexagons and octagons create distinctive badge shapes that stand out from typical circles and rectangles. Use 5-8 sided polygons with vertical gradients and drop shadows for professional-looking achievement badges, stat indicators, or decorative labels.
Decorative Elements
Scatter small polygons of varying sizes and side counts across backgrounds to create modern geometric patterns. Use different fill colors, rotate at various angles, and apply low opacity (30-50%) for subtle background decoration.
Tile Patterns
Hexagons are perfect for honeycomb tile patterns. Create a 100x100 hexagon, duplicate it multiple times, and arrange in offset rows to create a tessellating pattern. Vary the colors or fills for visual interest.
Adding Text to Polygons
Polygon layers include an "Add Text to Polygon" button that automatically creates a centered text layer within the polygon. This is incredibly useful for:
- Badge labels: Numbers, letters, or short words centered in hexagonal or pentagonal badges
- Icon text: Single letters or numbers in triangular or diamond shapes
- Stat displays: Numerical values in polygonal frames
- Decorative monograms: Initials in distinctive polygon shapes
Text automatically starts with center/middle alignment, ensuring perfect centering within the polygon regardless of its shape.
Rotation and Orientation
All polygons start with one point facing upward (12 o'clock position). This means:
- Triangles: Point up by default. Rotate 180° to point down, or 90°/270° to point left/right.
- Squares (4-sided): Appear as diamonds by default. Rotate 45° to make them look like squares.
- Hexagons: Have flat edges at top and bottom. Rotate 30° to have points at top and bottom instead.
- Pentagons: Point upward like a shield or house shape.
Stretching Polygons
While "regular polygon" traditionally means equal sides, Component.Studio lets you stretch polygons by using different width and height values:
| Width x Height | Effect |
|---|---|
| 200 x 200 | Perfect regular polygon - all sides visually equal |
| 300 x 150 | Horizontally stretched - wider than tall |
| 150 x 300 | Vertically stretched - taller than wide |
Stretched polygons maintain their angular relationships but elongate in one direction. A stretched hexagon becomes an elongated hex, perfect for horizontal or vertical labels. A stretched triangle becomes a longer, narrower arrow.
Dynamic Polygon Designs
Polygons become powerful when combined with template variables and data:
- Data-driven colors: Use
{{teamColor}}in Fill Color 1 to match team branding with polygon badges - Variable side counts: Use
{{difficulty}}to change the number of sides based on difficulty level (3 sides = easy, 8 sides = hard) - Dynamic sizing: Use
{{score / 10}}in Width and Height to make polygons grow with higher scores - Rotation for variety: Use
{{random() * 360}}to randomly rotate decorative polygons for organic variation
Design Tips and Best Practices
Choosing the Right Number of Sides
- 3-5 sides: Strong geometric identity, very recognizable as distinct shapes. Great for icons and bold design elements.
- 6-8 sides: Balanced between geometric and soft. Versatile for badges, tiles, and decorative elements.
- 9-12 sides: Approaching circular but still distinctly polygonal. Good for softer badges or medallions.
- 13-20 sides: Very close to circles with subtle geometric quality. Use when you want almost-circular shapes with a technical edge.
Corner Rounding Guidelines
- Keep it subtle for geometric emphasis: Corner radius of 5-15 maintains geometric character while softening edges slightly
- Go bold for friendly designs: Corner radius of 30-50 creates notably rounded, approachable shapes
- Sharp corners for technical feels: Use square corners (radius 0) for technical, precise, mathematical aesthetics
- Match corner style to content: Sharp for data/stats, rounded for friendly/playful content
Border and Fill Combinations
- No fill + thick border: Creates outline shapes perfect for wireframe designs or geometric patterns
- Gradient fill + contrasting border: Professional badge appearance with visual depth
- Solid fill + no border: Clean, simple shapes that work well for icons
- Texture fill + subtle border: Adds definition to textured polygons without overwhelming the pattern
General Polygon Tips
- Start regular, stretch as needed: Begin with equal width and height, then adjust if elongation would improve your design
- Use rotation purposefully: Don't just accept the default orientation - rotate to create the exact effect you want
- Layer polygons for complexity: Overlap different-sized polygons to create stars, compound shapes, or layered badges
- Consider border alignment: Outside borders maintain your intended polygon size; inside borders eat into the fill area
- Match polygon complexity to size: Use fewer sides (3-6) for small polygons, more sides (8+) for larger ones
Troubleshooting
My polygon looks like a circle
If you have 12+ sides, the polygon will look very circular. Lower the Number of Sides to 3-8 for more recognizable geometric shapes. Alternatively, if you actually want a circle, use an orb layer instead - it will be more efficient.
My rounded corners don't seem as round as I specified
The system automatically clamps corner radius to 40% of edge length to prevent overlapping corners. If you have a small polygon or one with many sides, the actual applied radius may be less than your setting. Try:
- Making the polygon larger (increase width and height)
- Using fewer sides (which creates longer edges)
- Accepting the automatic limit - it's preventing distorted shapes
My 4-sided polygon looks like a diamond, not a square
That's correct! Polygons always start with one point facing up. A 4-sided polygon has its corner at 12 o'clock, making it appear as a diamond. To make it look like a square, rotate it 45 degrees. Or, if you need a true square with horizontal and vertical edges, use a box layer instead.
Rotation doesn't seem to do anything
Check if you have a very high-sided polygon (15-20 sides) with no directional gradient. These look nearly identical at any rotation. Add a horizontal or vertical gradient, use texture fill, or add text inside the polygon to make rotation more apparent.
My border looks uneven
- If using center border alignment (50), the border splits evenly across the edge - this is correct
- Very thick borders on small polygons can appear uneven at sharp angles - reduce border thickness or increase polygon size
- Texture borders may look uneven if the texture has directional patterns - try a different texture or use color borders instead
My stretched polygon looks weird
Extreme stretching (like 400x50 or 50x400) can create unusual-looking shapes because the mathematical relationships between sides get distorted. For best results:
- Keep width:height ratio within 1:2 or 2:1 for recognizable shapes
- Use 3-6 sides for stretched polygons - higher side counts look odd when stretched
- Consider if a stretched box or orb might work better for extreme elongation
Polygon layers bring mathematical precision and geometric beauty to Component.Studio. From bold triangular arrows to sophisticated hexagonal badges, from simple diamonds to complex 20-sided medallions, polygons offer endless creative possibilities. Experiment with side counts, explore rounded corners, combine with gradients and effects, and discover the elegant world of geometric design!