Prompt Engineering with Gemini: Crafting DevFest 2025 Avatar Assets
Introduction
Welcome to the cutting edge of creative technology! This post explores the exciting intersection of AI-powered prompt engineering and visual asset generation, using the DevFest 2025 Avatar creator as a prime case study. Iβll dive into how Gemini, Google’s advanced AI model, can be leveraged alongside Gemini Flash 2.5 Image (also known as Nano Banana) to produce high-quality, diverse, and consistent image assets.
The Challenge: DevFest 2025 Avatar Creator
Since 2019, the DevFest Avatar creator has been designed to allow attendees to personalise their digital presence. This requires uploading an image, choosing a theme (colour or shape), and downloading the output, which is then shared on social media.
The 2025 version comes with a refreshed design and introduces dynamic background assets to showcase cultural diversity as DevFest events are held in many parts of the world. The need for diversity requires a cohesive style while offering significant variation based on actual culture. Manually creating these assets is a time-consuming and resource-intensive endeavour. This is where AI-driven content generation shines.
Gemini’s understanding of nuanced language and contextual information makes it an ideal partner for prompt engineering. Instead of simple, one-off prompts, we can design sophisticated prompt structures that guide the AI to generate specific types of assets while maintaining stylistic integrity.
What is Prompt Engineering?
Prompt engineering is the art and science of crafting effective inputs (prompts) to guide AI models towards desired outputs. For image generation, this involves more than just describing an image; it’s about specifying style, composition, lighting, and even the “mood” of the image.
Strategies for Gemini-Powered Asset Generation:
Iterative Refinement: Start with broad prompts and gradually add detail based on generated outputs. For instance, begin with “sci-fi hairstyle” and refine to “intricate braided sci-fi hairstyle with glowing blue accents.”
Parameter-Based Prompting: Utilize Gemini’s ability to understand structured requests. We can define parameters for different asset categories (e.g., [style: cyberpunk], [color_palette: neon], [asset_type: glasses]).
Negative Prompting: Instruct Gemini on what not to include, helping to avoid undesirable elements or maintain specific boundaries. For example, “exclude modern eyewear,” or “no abstract patterns.”
Style Transfer Prompts: If we have a reference image or a desired aesthetic, Gemini can be prompted to apply that style to new generations. “Generate a jacket in the style of an Italian.”
Batch Generation and Variation: Generate multiple variations from a single prompt to explore different interpretations and select the best fit.
The Role of Gemini Nano Banana
While Gemini excels at understanding and generating detailed textual prompts, Gemini Nano is built specifically for fast and detailed image generation by accepting sophisticated prompts as visual assets. “Nano Banana”.
Consistent Rendering: Ensure uniform quality and style across generated images based on Gemini’s directives.
Scalable Output: Handle the high volume of image requests needed for a comprehensive avatar creator.
API Integration: Allow programmatic generation, crucial for automating the asset creation pipeline.
Case Study: DevFest 2025 Avatar Creator - Background Assets
Let’s walk through a simplified example of generating background assets for the DevFest 2025 Avatar creator.
Prompting Process:
The process began with extracting design elements from the DevFest 2025 Organizer Design Guide. I provided input images for the Glyph and Monolines:
I then fed texts from the DevFest 2025 Brand Asset Guide into Gemini to derive information about the DevFest 2025 Brand Guide, which serves as a comprehensive resource for GDG organizers to ensure global brand consistency for all DevFest events. The guide outlines the necessity of using professionally designed assets and provides instructions on how to customize these assets using tools like Google Drawings or Adobe Illustrator to add local chapter names and event details. A substantial portion of the document is dedicated to itemizing an extensive list of available brand assets, spanning digital materials such as website banners and social media templates, print items like signage and water bottles, and specifications for brand colors and logos.
Here is the prompt:
"Generate a detailed summary of the DevFest 2025 Branding. This summary will be added to a prompt that will help gemini generate an image based on a given description of another image."
Result:
DevFest 2025 Branding Summary
The DevFest brand is built on a foundation of a unified, professional, and modern aesthetic. Its visual identity is defined by a clean design, a specific color palette, and a set of unique graphical elements.
**Core Colors & Palette**
The brand system uses a primary color palette derived from Google's core colors, along with lighter variations for emphasis and contrast.
**Core Colors:**
- Blue 500: #4285f4
- Green 500: #34a853
- Yellow 600: #f9ab00
- Red 500: #ea4335
**Halftones:**
- Halftone Blue: #57caff
- Halftone Green: #5cdb6d
- Halftone Yellow: #ffd427
- Halftone Red: #ff7daf
**Pastels:**
- Pastel Blue: #c3ecf6
- Pastel Green: #ccf6c5
- Pastel Yellow: #ffe7a5
- Pastel Red: #f8d8d8
**Grayscale:**
- OFF White: #f0f0f0
- Black 02: #1e1e1e
**Stylistic Glyphs**
The branding incorporates two distinct styles of abstract glyphs as design elements, which can be used for patterns or accents.
- Bold Glyphs: Abstract shapes with a solid fill.
- Monoline Glyphs: Simple, single-line shapes with no fill.
**Logos and Lockups**
The primary logo features the "DevFest" wordmark, often paired with the year "2025." There is also a secondary logo that places the "DevFest" wordmark within a set of brackets {}.
Further finetuning of the prompt resulted in an attempt to create a prompt for image generation based on the previous result.
Based on the provided DevFest 2025 Brand Guide, here is a Google Gemini Prompt designed to generate images of people, incorporating the specified theme:
"Generate an image of people attending a technology conference, specifically a DevFest event. The individuals should be depicted in a professional, modern, and engaging manner. The overall aesthetic of the image should reflect the unified and professional look and feel of DevFest events.
Incorporate the official DevFest colour palette prominently within the image, such as in the background, lighting, or subtle accents on clothing or accessories. The core colours to use are:
β’ Blue 500 (#4285f4)
β’ Green 500 (#34a853)
β’ Yellow 600 (#f9ab00)
β’ Red 500 (#ea4335)
Additionally, incorporate variations from the palette for emphasis and contrast, including:
β’ Halftone Blue (#57caff)
β’ Halftone Green (#5cdb6d)
β’ Halftone Yellow (#ffd427)
β’ Halftone Red (#ff7daf)
β’ Pastel Blue (#c3ecf6)
β’ Pastel Green (#ccf6c5)
β’ Pastel Yellow (#ffe7a5)
β’ Pastel Red (#f8d8d8)
β’ OFF White (#f0f0f0)
β’ Black 02 (#1e1e1e)
The imagery should convey a sense of innovation, community, and learning, characteristic of a developer conference. Consider subtle incorporation of stylized graphical elements or 'glyphs' reminiscent of the 'Sticker Sheet - Bold Glyphs' or 'Sticker Sheet - Monoline' designs, perhaps as abstract background patterns or digital overlays. The lighting should be vibrant and dynamic, using the brand colours to create an energetic yet professional atmosphere. Ensure the composition is clean and modern, aligning with the brand's emphasis on professionally designed assets."
Which generated:
Then there was a need to generate images based on cultures in the world.
Prompts like this was used:
Mention 40 most popular cultures of the world.
I need prompts for each to generate an image of a person based on a description of the culture.
The images will be used to create fun avatars for a tech event
And the result created something like this:
DevFest 2025 Event Portrait
Description
Generate a professional and modern portrait of a person at a DevFest 2025 technology conference. The image will be a clean, focused, and professional portrait that reflects the innovative and engaging spirit of a developer community.
The imagery must align with the official DevFest brand aesthetic by:
**Color Palette:** Prominently use the official color palette, either in the subject's clothing, the background, or dynamic lighting.
- Primary: Blue 500 (#4285f4), Green 500 (#34a853), Yellow 600 (#f9ab00), Red 500 (#ea4335)
- Halftone: Blue (#57caff), Green (#5cdb6d), Yellow (#ffd427), Red (#ff7daf)
- Pastel: Blue (#c3ecf6), Green (#ccf6c5), Yellow (#ffe7a5), Red (#f8d8d8)
- Neutrals: Off White (#f0f0f0), Black 02 (#1e1e1e)
**Thematic Elements:** Subtly convey themes of innovation and community. Incorporate stylized graphical 'glyphs' as abstract background patterns or as a design element on the person's clothing.
**Lighting & Composition:** Use vibrant and dynamic lighting that leverages the brand colors. The composition should be clean and focused on the individual.
Other steps in Prompting Process: are Generating actual individuals based on the cultures.
To generate culturally diverse avatars, the base prompt was customized for each culture. For example, the sample prompt described a man in a DevFest t-shirt with monoline glyphs, set in a European city square inspired by Yorkshire House. This was adapted for various cultures by incorporating specific attire, settings, and elements from the cultures list, such as:
Italian: A stylish avatar of a person wearing an Italian-inspired suit.
Chinese: A detailed portrait of a person in traditional Chinese attire.
Yoruba: A portrait of a person in traditional Yoruba clothing.
American: A futuristic avatar of a person at a tech conference.
Backgrounds were consolidated into a structured format for API calls, each describing a unique cultural setting in a Studio Ghibli-inspired watercolor style. Examples include:
For Yoruba: A vibrant Nigerian courtyard with traditional architecture, carved wooden doors, lush gardens, and details like kola nuts and a talking drum.
For Turkish: A bustling marketplace with ornate buildings, scattered tulip petals, a tea set, and a cat weaving through the crowd.
For Japanese: A city street with neon lights, cherry blossom petals, a vending machine, and a cat by a shop entrance.
The glyphs from the DevFest design were described by Gemini as:
Bold Glyphs: A collection of glyphs and symbols with thick, rounded outlines and distinct, flat colors, including square brackets in #ffe7a5, a semicolon in #ffd427, curly brackets in #ccf6cf, a parenthesis in #ff7daf, and more.
Monoline Glyphs: A collection rendered with thin, single black lines, featuring a right-pointing arrow with curved wings, wavy brackets, less-than/greater-than signs, square brackets, an equals sign, an asterisk, a globe symbol, a hash sign, curly brackets, parallel diagonal lines, a semicolon, a colon, a heart symbol, an at sign, and parentheses.
These descriptions ensured accurate integration of brand elements into the generated images.
Enhancing the Avatar Creator with Gemini Image Editing
In addition to generating new avatars from scratch, the DevFest Avatar creator now features an advanced image editing capability powered by Gemini AI. The seventh button allows users to upload their own image and transform it by seamlessly integrating DevFest backgrounds and design effects, creating a personalized avatar that blends the user’s likeness with the event’s branding.
The transformation uses a sophisticated prompt that instructs Gemini to analyze the uploaded image and recreate it as a masterpiece digital painting in the iconic and nostalgic art style of Studio Ghibli. This includes incorporating random cultural backgrounds, DevFest branding colors, and up to 8 randomly selected glyphs (both bold and monoline styles) as design elements in the background.
Here’s an excerpt from the prompt used:
Step 1)
Analyze this image and derive a detailed description of its content, style, and any notable features.
Step 2)
Create a masterpiece digital painting in the iconic and nostalgic art style of Studio Ghibli based on the image attached and based on the following:
Background:
${backgroundDescription}
Atmosphere:
Primary Lighting: The scene is bathed in the soft, ethereal light of an overcast sky, a signature of Ghibli films. This creates gentle shadows and prevents any harshness, lending a nostalgic and slightly melancholic feel to the image.
DevFest Thematic Lighting: Weaving through this gentle ambiance are magical, luminous projections of light, representing the innovative spirit of DevFest. These are soft, glowing, translucent waves of color that drift like spirits through the air. A wide, gentle arc of Halftone Yellow (#ffd427) settles on the stone path, while a soft, ethereal glow of Halftone Red (#ff7daf) kisses the side of a building. These lights interact with the environment, casting soft, colorful reflections on the wet stones and creating a beautiful and dreamlike contrast between the old world and new technology.
Color Palette: The overall color scheme is rich and harmonious. The DevFest brand colors are seamlessly integrated into the Ghibli palette. The primary blues, greens, yellows, and reds are present but are saturated in a way that feels organic and painterly, not digital. The OFF White (#f0f0f0) of the building trims and the deep Black 02 (#1e1e1e) of the character's shirt provide grounding and contrast.
Atmosphere: The mood is one of peaceful engagement and wonder. It's a snapshot of a person fully present, absorbing the knowledge and community around them. It combines the cozy, everyday magic of Studio Ghibli with the forward-thinking optimism of a developer conference, suggesting that technology, at its best, is a humanistic and creative endeavor.
DevFest 2025 Branding Guidelines:
- Modern, clean, professional aesthetic
- Use Google's core colors visually (do not render color codes, names, or hex values as text anywhere in the image): Blue 500 (#4285f4), Green 500 (#34a853), Yellow 600 (#f9ab00), Red 500 (#ea4335)
- Halftones, pastels, and grayscale as accents
- Do NOT generate any Google logo, branding, DevFest wordmark, or year in the image
- Incorporate up to 4 randomly selected bold glyphs (abstract shapes with solid fill) and up to 4 randomly selected monoline glyphs (simple, single-line shapes with no fill) as design elements
- Glyphs and monolines should appear only in the background, not on the characters or main subject
- Do not render any color codes, names, or hex values as text in the image. Use the colors visually only for graphical elements, backgrounds, and accents.
- The avatar should reflect a unified, professional, and modern DevFest identity
- Use graphical elements for patterns or accents
- The final image should be suitable for social media and event branding
Glyphs (choose up to 4, random each image):
A collection of glyphs and symbols with thick, rounded outlines and distinct, flat colors, including square brackets in #ffe7a5, a semicolon in #ffd427, curly brackets in #ccf6cf, a parenthesis in #ff7daf, and more.
**Monoline Glyphs:** A collection rendered with thin, single black lines, featuring a right-pointing arrow with curved wings, wavy brackets, less-than/greater-than signs, square brackets, an equals sign, an asterisk, a globe symbol, a hash sign, curly brackets, parallel diagonal lines, a semicolon, a colon, a heart symbol, an at sign, and parentheses.
These descriptions ensured accurate integration of brand elements into the generated images.
This feature enhances personalization by allowing users to create avatars that are uniquely theirs, while ensuring consistency with the DevFest brand and promoting cultural diversity through the integrated backgrounds.
## Challenges and Lessons Learned
Throughout the development of the DevFest 2025 Avatar creator, several challenges emerged in the prompt engineering process:
- **Consistency Across Cultures**: Ensuring that generated avatars maintained a unified DevFest aesthetic while accurately representing diverse cultural elements required careful prompt tuning and iterative refinement.
- **Balancing Detail and Efficiency**: Crafting prompts that captured intricate cultural details without overwhelming the AI model or slowing down generation times.
- **Ethical Considerations**: Avoiding stereotypes and ensuring respectful representations of cultures, which involved extensive research and community feedback.
- **Technical Limitations**: Handling variations in image quality and occasional inconsistencies in glyph rendering, mitigated through batch generation and manual curation.
Key lessons learned include the importance of starting with broad prompts and refining iteratively, the value of structured parameter-based prompting for scalability, and the need for human oversight in AI-generated content to maintain quality and cultural sensitivity.
## Resources and Further Reading
For more information on Gemini's image generation capabilities, check out the official documentation: [Gemini API Image Generation](https://ai.google.dev/gemini-api/docs/image-generation).
Additional resources:
- [Prompt Engineering Best Practices](https://ai.google.dev/docs/prompt_best_practices) - Tips for effective prompting with Gemini.
## Conclusion
The combination of Gemini's advanced prompt engineering capabilities and a dedicated image generation tool like "Nano Banana" offers a powerful solution for creating vast libraries of consistent and diverse visual assets. For initiatives like the DevFest 2025 Avatar creator, this AI-driven approach significantly reduces development time and resources, while opening up new possibilities for creative expression and user personalization.
Ready to experiment with your own prompts? Try the DevFest Avatar creator at [goo.gle/devfest-avatar](https://goo.gle/devfest-avatar) and see how AI can enhance your digital presence. The future of content creation is collaborative, with humans guiding AI to unlock unprecedented levels of efficiency and innovation.