From ae9d0e141d3d56713f348ba3d2dc9648d208ff2d Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Tue, 9 Jun 2020 13:56:43 -0400 Subject: [PATCH] Make the box a bit transparent --- overlay.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/overlay.py b/overlay.py index d506a4c..9c2959f 100644 --- a/overlay.py +++ b/overlay.py @@ -20,14 +20,14 @@ def overlay(image_in): draw = ImageDraw.Draw(overlay) font = ImageFont.truetype("OptimusPrinceps.ttf", font_size) - draw.rectangle([0, rect_top[1], size[0], rect_bot[1]], fill=(0,0,0)) + draw.rectangle([0, rect_top[1], size[0], rect_bot[1]], fill=(0,0,0, 200)) for y in range(-1, -gradient_range - 1, -1): - c = 255 - 255 * (-y) // gradient_range + c = 200 - 200 * (-y) // gradient_range draw.line([0, rect_top[1] + y, size[0], rect_top[1] + y], fill=(0,0,0,c)) for y in range(1, gradient_range + 1, 1): - c = 255 - 255 * (y) // gradient_range + c = 200 - 200 * (y) // gradient_range draw.line([0, rect_bot[1] + y, size[0], rect_bot[1] + y], fill=(0,0,0,c)) text_size = draw.textsize(message, font=font)