generate_icon
Generate custom icons as PNG, ICO, or ICNS files with customizable shapes, styles, gradients, text, and shadows. Save directly to a specified path using local rendering, no external APIs required.
Instructions
Render a single icon and save it to out_path.
Parameters
out_path : str
Destination file path. Extension determines the format unless fmt is given.
Supported extensions: .png (default), .ico, .icns.
text : str
Short label drawn in the center (initials, single glyph, or emoji).
style : str
One of gradient / solid / outlined / shape / mono.
size : int
Edge length in pixels, 16..2048.
shape : str
One of circle / square / rounded / triangle / hexagon / diamond.
fg_color, bg_color, bg_color_2, border_color : str
CSS-like color strings (#RRGGBB or named colors).
gradient_angle : float
Gradient direction in degrees (0 = left→right, 90 = top→bottom).
font_scale : float
Text height as fraction of the icon size (0.05..1.2).
corner_radius : float
Corner radius fraction for shape='rounded' (0..0.5).
border_width : float
Stroke width as a fraction of the icon size (0..0.15).
shadow : bool
Add a soft drop shadow behind the icon silhouette.
fmt : str, optional
Force output format (png / ico / icns).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fmt | No | ||
| size | No | ||
| text | No | ||
| shape | No | rounded | |
| style | No | gradient | |
| shadow | No | ||
| bg_color | No | #4F8DFD | |
| fg_color | No | #FFFFFF | |
| out_path | Yes | ||
| bg_color_2 | No | #8E5BFF | |
| font_scale | No | ||
| border_color | No | #FFFFFF | |
| border_width | No | ||
| corner_radius | No | ||
| gradient_angle | No |