Wednesday, 4 February 2026

Valentine's Week List 2026 in Python

 




Source Code:

from PIL import Image, ImageDraw, ImageFont

# Canvas size
W, H = 900, 1100
img = Image.new("RGB", (W, H), "#fdfcff")  # soft white background
d = ImageDraw.Draw(img)

# Safe font loader
def font(size):
    try:
        return ImageFont.truetype("arial.ttf", size)
    except:
        return ImageFont.load_default()

title_f = font(46)
text_f  = font(32)

# Title (brighter gradient-style color)
d.text((200, 32), "Valentine's Week List 2026", fill="#6c1ce7", font=title_f)

# Card data with BRIGHT pastel colors
cards = [
    ("Rose Day", "Feb 7",  "rose.jpeg",      "#ffe6ea"),
    ("Propose Day", "Feb 8", "ring.jpeg",    "#e6f0ff"),
    ("Chocolate Day", "Feb 9", "choc.jpeg",  "#ffe9f3"),
    ("Teddy Day", "Feb 10", "teddy.jpeg",    "#e6fff7"),
    ("Promise Day", "Feb 11", "promise.jpeg","#fff0e6"),
    ("Hug Day", "Feb 12", "hug.jpeg",        "#fff6dd"),
    ("Kiss Day", "Feb 13", "kiss.jpeg",      "#f0e9ff"),
    ("Valentine Day", "Feb 14", "heart.jpeg","#e6ffe6")
]

y = 120
for name, date, emoji_file, color in cards:
    # Soft shadow (lighter + realistic)
    d.rounded_rectangle(
        (90, y+8, 830, y+100),
        radius=32,
        fill="#dcdcdc"
    )

    # Card (bright pastel)
    d.rounded_rectangle(
        (80, y, 840, y+92),
        radius=32,
        fill=color
    )

    # Emoji
    emoji = Image.open(emoji_file).convert("RGBA").resize((52, 52))
    img.paste(emoji, (115, y+20), emoji)

    # Text
    d.text((190, y+32), name, fill="#222222", font=text_f)
    d.text((680, y+32), date, fill="#444444", font=text_f)

    y += 115

# Watermark (clean & subtle)
d.text((400, 1055), "Source Code : clcoding.com", fill="#999999", font=text_f)

# Save & show
img.save("valentine_week_BRIGHT.png")
img.show()


Output:






0 Comments:

Post a Comment

Popular Posts

Categories

100 Python Programs for Beginner (118) AI (192) Android (25) AngularJS (1) Api (7) Assembly Language (2) aws (28) Azure (8) BI (10) Books (262) Bootcamp (1) C (78) C# (12) C++ (83) Course (84) Coursera (299) Cybersecurity (29) data (1) Data Analysis (25) Data Analytics (18) data management (15) Data Science (261) Data Strucures (15) Deep Learning (108) Django (16) Downloads (3) edx (21) Engineering (15) Euron (30) Events (7) Excel (18) Finance (9) flask (3) flutter (1) FPL (17) Generative AI (54) Git (9) Google (47) Hadoop (3) HTML Quiz (1) HTML&CSS (48) IBM (41) IoT (3) IS (25) Java (99) Leet Code (4) Machine Learning (231) Meta (24) MICHIGAN (5) microsoft (9) Nvidia (8) Pandas (13) PHP (20) Projects (32) Python (1248) Python Coding Challenge (1002) Python Mistakes (43) Python Quiz (411) Python Tips (5) Questions (3) R (72) React (7) Scripting (3) security (4) Selenium Webdriver (4) Software (19) SQL (46) Udemy (17) UX Research (1) web application (11) Web development (8) web scraping (3)

Followers

Python Coding for Kids ( Free Demo for Everyone)