diff --git a/config.toml b/config.toml index 81b4f14..da4aac4 100644 --- a/config.toml +++ b/config.toml @@ -29,3 +29,4 @@ command = [ "python", "./res/pdweather.py" ] font = "./res/curie.bdf" text_filters = [ "lowercase" ] text_offset = [45, 4] +text_fill = [255, 255, 255] # your template image must have alpha channel to use alpha diff --git a/src/main.py b/src/main.py index 107c4fa..71bee17 100755 --- a/src/main.py +++ b/src/main.py @@ -44,7 +44,9 @@ def generate(config): elif filter == "uppercase": text = text.upper() - draw.text(config.get('text_offset', [0, 0]), text, font=font, fill=(255, 255, 255, 255)) + fill = config.get('text_fill') + fill = tuple(fill) if fill else None + draw.text(config.get('text_offset', [0, 0]), text, font=font, fill=fill) img.save(config['output'], save_all=True)