From: Michael Tremer Date: Mon, 9 Mar 2026 15:04:23 +0000 (+0000) Subject: users: Give the avatars a darker background X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=97adf59fd6458db49fbee22c1cd00cc4591c73f9;p=ipfire.org.git users: Give the avatars a darker background Signed-off-by: Michael Tremer --- diff --git a/src/web/users.py b/src/web/users.py index 0b347e61..17eaebca 100644 --- a/src/web/users.py +++ b/src/web/users.py @@ -13,8 +13,8 @@ from .. import util from . import base from . import ui_modules -COLOUR_LIGHT = (237,232,232) -COLOUR_DARK = (49,53,60) +COLOUR_TEXT = (255,255,255) +COLOUR_BG = (54,54,54) class IndexHandler(base.AnalyticsMixin, base.BaseHandler): @tornado.web.authenticated @@ -180,14 +180,14 @@ class AvatarHandler(base.BaseHandler): height = int(height * 1.75) # Generate an image of the correct size - image = PIL.Image.new("RGBA", (width, height), COLOUR_LIGHT) + image = PIL.Image.new("RGBA", (width, height), COLOUR_BG) # Have a canvas draw = PIL.ImageDraw.Draw(image) # Draw the letter in the center draw.text((width // 2, height // 2), "".join(letters), - font=font, anchor="mm", fill=COLOUR_DARK) + font=font, anchor="mm", fill=COLOUR_TEXT) return util.generate_thumbnail(image, size, square=True, format=format)