Skip to content

Instantly share code, notes, and snippets.

from PIL import Image, ImageOps, ImageEnhance, ImageColor
import colorsys
def recolor_icon(
img: Image.Image,
hex_color: str,
highlight_strength: float,
shadow_strength: float,
glare_threshold: int = 235,
min_glare_ratio: float = 0.1,