23 Jul 2021 |
@grahamc:nixos.org | hrm I tried to add a URL parameter to the community room's avatar but it breaks the rendering: "avatar": "mxc://nixos.org/721c442bc81f9fedaeada3ad89af693666619889?autogenerated=1" | 16:11:43 |
CRTified | In reply to @grahamc:nixos.org hrm I tried to add a URL parameter to the community room's avatar but it breaks the rendering: "avatar": "mxc://nixos.org/721c442bc81f9fedaeada3ad89af693666619889?autogenerated=1" I wonder if the mimetype is preserved - in that case you could use a parameter there? 🤔 | 16:29:12 |
CRTified | Looks like it is preserved - both in the event (where you can supply it under the info ->mimetype key), and when uploading the image (in that case it's the Content-Type header) | 16:36:09 |
CRTified | ![image.png](https://matrix.nixos.dev/_matrix/media/r0/thumbnail/ruhr-uni-bochum.de/zHlCgcPjKABcZmnxRNpjJcEs?height=360&method=scale&width=360) Download image.png | 16:36:30 |
CRTified | The HTTP header is actually perserved across servers 🤔 | 16:36:43 |
CRTified | * The HTTP header is actually perserved across homeservers 🤔 | 16:36:46 |
CRTified | ![new.png](https://matrix.nixos.dev/_matrix/media/r0/thumbnail/ruhr-uni-bochum.de/FLuhwQMLOOByRVZPRpCTqhgM?height=360&method=scale&width=360) Download new.png | 17:02:42 |
CRTified | That's generated by
#! /usr/bin/env nix-shell
#! nix-shell -i sh -p inkscape
val=$(echo "Let's test it" | sha512sum -)
color1=${val:0:3}
color2=${val:4:3}
echo $color1
echo $color2
cat nix-snowflake.svg \
| sed "s/7EBAE4/${color1}/gi" \
| sed "s/5277C3/${color2}/gi" \
| inkscape -z -w 128 --pipe -o new.png
| 17:02:50 |
CRTified | (Using the nix-snowflake.svg from https://github.com/NixOS/nixos-artwork/tree/master/logo ) | 17:03:29 |
@grahamc:nixos.org | wow! | 17:10:17 |
CRTified | If you want to keep some reference to the room name: This will use the first letter of the second word and write it in there, too:
#! /usr/bin/env nix-shell
#! nix-shell -i sh -p inkscape imagemagick
INPUT="Nix Matrix Discussion"
LETTER=$(echo "$INPUT" | awk '{print $2}' | head -c1)
val=$(echo "$INPUT" | sha512sum -)
color1=${val:0:3}
color2=${val:3:3}
color3=${val:6:3}
color4="000"
cat nix-snowflake.svg \
| sed "s/7EBAE4/${color1}/gi" \
| sed "s/5277C3/${color2}/gi" \
| inkscape -z -w 256 --pipe --export-type=png --export-filename=-\
| convert png:- -font "DejaVu-Sans-Bold" -gravity center \
-pointsize 128 -fill "#${color3}" -stroke "#${color4}" -strokewidth 4 -annotate 0 "$LETTER" \
new.png
| 17:19:28 |
kevincox | We should also consider overlaying a word or too if we want to get fancy 🙂 | 17:19:29 |
CRTified | ![new.png](https://matrix.nixos.dev/_matrix/media/r0/thumbnail/ruhr-uni-bochum.de/SZrqVulWcYGaIzsumIJXNGDj?height=360&method=scale&width=360) Download new.png | 17:19:38 |
kevincox | You read my mind :) | 17:19:40 |
CRTified | Would give e.g. this | 17:19:42 |
CRTified | not the prettiest color combination, but it should be easier to identify that way :D | 17:20:07 |
@grahamc:nixos.org | it might "encourage" people to come up with other ones | 17:27:55 |
CRTified | Alternatively one could stick to the nix logo colors for the letter 🤔 | 17:32:46 |
CRTified | ![new.png](https://matrix.nixos.dev/_matrix/media/r0/thumbnail/ruhr-uni-bochum.de/ArheASiJklRzgtmTuYByHLqa?height=360&method=scale&width=360) Download new.png | 17:32:52 |
CRTified | That was generated by
#! /usr/bin/env nix-shell
#! nix-shell -i sh -p inkscape imagemagick
INPUT="Nix Matrix Discussion"
LETTER=$(echo "$INPUT" | awk '{print $2}' | head -c1)
val=$(echo "$INPUT" | sha512sum -)
color1=${val:0:3}
color2=${val:3:3}
color3="7EBAE4" # ${val:6:3} # Color for Letter
color4="5277C3" # Outline for Letter
FONT="DejaVu-Sans-Bold"
SIZE=256
cat nix-snowflake.svg \
| sed "s/7EBAE4/${color1}/gi" \
| sed "s/5277C3/${color2}/gi" \
| inkscape -z -w ${SIZE} --pipe --export-type=png --export-filename=-\
| convert png:- -font "$FONT" -gravity center \
-pointsize "$(($SIZE / 3))" -fill "#${color3}" -stroke "#${color4}" -strokewidth 3 -annotate 0 "$LETTER" \
new.png
| 17:32:59 |
@grahamc:nixos.org | I've put up the samueldr-signal to get some feedback | 17:33:04 |
@grahamc:nixos.org | CRTified: what I heard back is two-fold:
- the geometric logos are more unique in shape, color, pattern
- the differently colored NixOS logos is a bit strange because it creates a ton of not-quite-the-logo logos
I'm inclined to go with the purely geometric ones
| 18:06:03 |
@grahamc:nixos.org | * CRTified: what I heard back is two-fold:
- the geometric logos are more unique in shape, color, pattern
- the differently colored NixOS logos are a bit strange because it creates a ton of not-quite-the-logo logos
I'm inclined to go with the purely geometric ones
| 18:06:21 |
CRTified | Yea, was just an idea that I had and hacked together | 18:23:41 |
sumner | I think it's a cool idea, but it's a bit extra IMO. | 18:25:24 |
kevincox | Maybe something more subtle would be a black logo on top of a random colour? But that may not provide as much differentiation. | 18:27:05 |
@grahamc:nixos.org | good idea on adding autogenerated to the content-type, I've done so: https://matrix.org/_matrix/media/r0/download/nixos.org/7ddbde62f62810a7c9eaabfd0a11ef1ce4d87ef2 | 18:34:03 |
| ma27 joined the room. | 19:14:21 |
infinisil | Having a hard time finding things again in Matrix | 20:16:47 |
infinisil | In IRC where I had text-based logs I could just grep for stuff | 20:17:00 |