Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

jdenticon: Update lightness range of colored and grayscale shapes.

Prakhar Pratyush4c6e5c25b5bd
diff --git a/zerver/lib/avatar.py b/zerver/lib/avatar.py
index 5424e253d8c..470b8bcbd5c 100644
--- a/zerver/lib/avatar.py
+++ b/zerver/lib/avatar.py
@@ -190,7 +190,19 @@ def generate_avatar_jdenticon(input: str, medium: bool) -> bytes:
else os.path.join(settings.DEPLOY_ROOT, "node_modules/jdenticon/bin/jdenticon.js")
)
size = str(MEDIUM_AVATAR_SIZE if medium else DEFAULT_AVATAR_SIZE)
- command = ["node", jdenticon_path, input, "-s", size, "-p", "0"]
+ command = [
+ "node",
+ jdenticon_path,
+ input,
+ "-s",
+ size,
+ "-p",
+ "0",
+ "--lightness-color",
+ "0.3,0.7",
+ "--lightness-grayscale",
+ "0.3,0.7",
+ ]
try:
stdout = subprocess.check_output(command)
return stdout