from PIL import Image, ImageDraw, ImageFont
import numpy as np

# Create a blank image
width, height = 800, 600
image = Image.new('RGB', (width, height), 'black')
draw = ImageDraw.Draw(image)

# Add dance floor and confetti effect
def add_confetti(draw, width, height, num_confetti=100):
    colors = ['red', 'blue', 'green', 'yellow', 'purple', 'orange']
    for _ in range(num_confetti):
        x = np.random.randint(0, width)
        y = np.random.randint(0, height)
        color = np.random.choice(colors)
        draw.rectangle([x, y, x + 5, y + 5], fill=color)

# Add dynamic lighting effects
def add_lighting(draw, width, height):
    lighting_colors = [(255, 0, 0, 127), (0, 255, 0, 127), (0, 0, 255, 127)]
    for color in lighting_colors:
        ellipse_x0 = np.random.randint(-width // 2, width // 2)
        ellipse_y0 = np.random.randint(-height // 2, height // 2)
        ellipse_x1 = ellipse_x0 + width
        ellipse_y1 = ellipse_y0 + height
        draw.ellipse([ellipse_x0, ellipse_y0, ellipse_x1, ellipse_y1], fill=color, outline=color)

# Add a DJ in the background
def add_dj(draw, width, height):
    dj_color = (255, 255, 255)
    dj_x = width // 2 - 50
    dj_y = height // 2 + 100
    dj_width = 100
    dj_height = 150
    draw.rectangle([dj_x, dj_y, dj_x + dj_width, dj_y + dj_height], fill=dj_color)
    draw.rectangle([dj_x + 10, dj_y - 20, dj_x + dj_width - 10, dj_y], fill=dj_color)
    draw.rectangle([dj_x + 30, dj_y - 40, dj_x + dj_width - 30, dj_y - 20], fill=dj_color)

# Apply the drawing functions
add_confetti(draw, width, height)
add_lighting(draw, width, height)
add_dj(draw, width, height)

# Show the image
image.show()