]> git.ipfire.org Git - ipfire.org.git/commitdiff
users: Give the avatars a darker background
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 9 Mar 2026 15:04:23 +0000 (15:04 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 9 Mar 2026 15:04:23 +0000 (15:04 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/users.py

index 0b347e612d439efceee8260ff58da85c44cd66d0..17eaebca6ce782810fc0e010d23005cfb68e202a 100644 (file)
@@ -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)