Generate beautiful social card images with a builder API. One dependency: Pillow.
Built by humanjava.com — find this and other tools for the agentic age at huje.tools.
pip install socialcardfrom socialcard import SocialCard
SocialCard("og").title("My Project").subtitle("A cool tool").render("card.png")(SocialCard("og", theme="midnight")
.badge("Open Source")
.title("My Project")
.subtitle("Deploy in seconds")
.cards(["Python", "Pillow", "MIT"])
.footer("myproject.dev")
.accent("#f97316")
.grid()
.glow()
.render("card.png"))| Preset | Size | Use Case |
|---|---|---|
og |
1200×630 | Open Graph / link previews |
twitter |
800×418 | Twitter/X cards |
github |
1280×640 | GitHub social preview |
square |
1080×1080 | Instagram / social |
dark— Navy background, blue accentlight— White background, blue accentmidnight— Near-black, purple accent
card = SocialCard(preset, theme) # preset: str or Preset, theme: str or Theme
card.badge("text") # Small pill at top
card.title("text") # Main heading
card.subtitle("text") # Subheading
card.cards(["a", "b", "c"]) # Tag chips
card.footer("text") # Bottom text
card.accent("#hex") # Override accent color
card.grid() # Subtle grid overlay
card.glow() # Radial glow effect
card.render("path.png") # Save to file, returns Image
card.render_bytes() # Returns PNG bytesclawhub install socialcardMIT