Generate app main image

Necessary bricks
Contributor(s)
Publication date

Nov 5, 2025

Confidentiality
Public
Reactions
0
0
Share

Description of the agent

A Python script that generates beautiful images with gradient backgrounds and centered color emojis. This is useful to generate the image of an application



Features


  • Gradient Background: Creates a diagonal gradient (135°) with customizable colors
    • Color Emojis: Renders emojis in full color using the Twemoji library (same emojis as Twitter/web browsers)
      • Customizable: Control image size, emoji size, and colors
        • Simple: Easy-to-use command-line interface


          How It Works


          1. Color Processing: Converts hex color to RGB and creates a lighter variant for the gradient start
            1. Gradient Creation: Generates a 135° diagonal gradient from light (15% opacity) to full color
              1. Emoji Rendering: Uses the pilmoji library to render color emojis from Twemoji
                1. Centering: Automatically centers the emoji in the image
                  1. Output: Saves the final image as PNG

                    Technical Details


                    Gradient Algorithm


                    The script creates a diagonal gradient at 135 degrees (from top-right to bottom-left) by:


                    • Mixing the base color with white at 15% for the start color
                      • Using the full base color for the end color
                        • Interpolating colors pixel-by-pixel along the diagonal

                          Emoji Rendering


                          Color emojis are rendered using the pilmoji library, which:


                          • Downloads Twemoji assets (Twitter's open-source emoji set)
                            • Composites them onto the image with proper transparency
                              • Maintains full color fidelity

                                Dependencies


                                • numpy: For efficient gradient calculations
                                  • Pillow (PIL): For image creation and manipulation
                                    • pilmoji: For color emoji rendering
                                      • emoji: Required by pilmoji (version 2.2.0 for compatibility)

                                        Latest version infos (V2)

                                        Input(s)

                                        Output(s)

                                        File or folder

                                        Parameters

                                        emoji

                                        Emoji in the middle of the image

                                        Type : string

                                        color

                                        Color of the background in hex format (e.g., #FF5733)

                                        Type : string

                                        width

                                        Optional

                                        Type : intDefault value : 500

                                        Height

                                        Optional

                                        Type : intDefault value : 500

                                        emoji_size

                                        Optional

                                        Type : floatDefault value : 0.4

                                        Environment file

                                        Code

                                        Comments (0)

                                        Write a comment
                                        Ready-to-use smart agents

                                        Have you developed an agent?

                                        Share it to accelerate projects for the entire community.