o
    %Zc                      @   s$   d dl mZ dddZdddZdS )	    )ImageFc                 C   s@   |  |rdnd} | d}ddt|  }|| }| }|S )NRGBARGB)   r   #z%02x)convertgetpixellenupper)imgalphapixel_colorcolor_formatcolor r   E/var/www/jaguar/venv/lib/python3.10/site-packages/colorfield/utils.pyget_image_background_color   s   
r   c                 C   s>   d}t | }t||}W d    |S 1 sw   Y  |S )N )r   openr   )img_filer   r   imager   r   r   get_image_file_background_color   s   
r   N)F)PILr   r   r   r   r   r   r   <module>   s   
	