Skip to content

Instantly share code, notes, and snippets.

@statico
Created February 4, 2026 02:43
Show Gist options
  • Select an option

  • Save statico/0231c73fe5e5ef37cd673d77035132e5 to your computer and use it in GitHub Desktop.

Select an option

Save statico/0231c73fe5e5ef37cd673d77035132e5 to your computer and use it in GitHub Desktop.
nano banana small images

Here's a comprehensive summary of tips for getting Nano Banana (Gemini) to generate images better suited for small use cases:

Pixel Art Tips

Use specific dimension keywords:

  • "32×32 pixel art icon of [subject]"
  • "16-bit pixelated [subject]"
  • "8-bit pixel art in the style of [retro game]"
  • "Low-resolution pixel art" or "chunky pixels"

Caution with Nano Banana Pro: The Pro version has a bias toward realism and may push pixel art toward 32-bit quality rather than true 8-bit styles. The base Nano Banana (Gemini 2.5 Flash Image) may work better for intentionally stylized looks.

Icons & Avatars

Effective prompt formula:

An icon representing a [subject]. The background is white. 
Make the icon in a colorful and tactile 3D style. No text.

For Discord/profile avatars:

Create a [style] avatar image to represent [subject/character]. 
Centered composition, clean edges.

Transparency Workarounds

The problem: Nano Banana doesn't output true alpha transparency. Asking for "transparent background" produces white, black, or fake checkerboard patterns.

Best workaround - Black/White difference method:

  1. Generate your asset on a pure white (#FFFFFF) background
  2. Feed it back asking to change the white to pure black (#000000)
  3. Use math to calculate transparency from the pixel differences
  4. This preserves semi-transparent effects like glass and shadows

Alternative - Chromakey green method:

[Your subject] on a solid, flat, uniform chromakey green background 
using EXACTLY hex color #00FF00. The subject MUST have a clean white 
outline/border (2-3 pixels wide) separating it from the green background.
Crisp, sharp, well-defined edges - no soft or blurry boundaries.

Then strip the green using HSV detection in post-processing.

General Prompting Tips

  • Don't over-prompt: Skip "4k, trending on artstation, masterpiece" spam. Natural language works better.
  • Describe scenes, don't list keywords: A narrative paragraph beats disconnected words.
  • Use photographic language: "macro shot", "low-angle perspective", "85mm portrait lens"
  • For text: "Write the text 'HELLO' in a bold, red, serif font on the sign"
  • Sticker style: "A cartoon/illustration sticker style with bold colors, clean white outline"

Sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment