transparent-icons
Installation
SKILL.md
Transparent Icons
Generate flat scientific icons (Nature/Science journal style) with transparent backgrounds. Used as panel elements by the [[scientific-figure]] composer or as standalone graphics for posters, presentations, and grants.
Backends
Two generation backends, auto-selected:
- Codex CLI
image_gentool (preferred). Uses the local Codex authentication (~/.codex/auth.json). NoOPENAI_API_KEYrequired. Internally uses gpt-image-2 (April 2026). Default whencodexis on$PATHand authenticated. - OpenAI Images API (fallback). Calls
client.images.generate(model="gpt-image-2", ...)directly. RequiresOPENAI_API_KEYin environment or.env.
Why two backends: many researchers have a ChatGPT subscription and codex login but no separate API key. Auto-selection routes through Codex first to keep the no-API-key path working; explicit --backend codex or --backend api overrides.
Transparency
gpt-image-2 (April 2026) does not accept background="transparent" — both backends always generate opaque PNGs. Transparency is applied as a post-process. Two methods:
threshold(default) — drop near-white pixels via Pillow. Fast, no extra deps. Works well for flat 2-color icons on a clean white background. Can leave fringes on anti-aliased edges and may erase highlights where the foreground itself is near-white.birefnet(opt-in) —rembg+ BiRefNet ONNX model with alpha matting. Cleaner edges, handles complex foregrounds. One-time ~400 MB model download on first run; requires extra deps (rembg,onnxruntime).