Re: [RFC PATCH] emacs: add notmuch-logo.svg

Subject: Re: [RFC PATCH] emacs: add notmuch-logo.svg

Date: Mon, 01 Nov 2021 20:56:03 -0300

To: Tomi Ollila

Cc:

From: David Bremner


Tomi Ollila <tomi.ollila@iki.fi> writes:

> handcrafted scalable vector graphics version of the notmuch logo
>
> for sharper image
> ---
>

nice work! 

> Loads in emacs, on my screen letter was white on white background
> (emacs dark background) so hints how to make it look better on
> dark mode emacs (i.e. white lines instead of black) and how to
> have transparent background for everyone...
>

transparency seems easy?

diff --git a/emacs/notmuch-logo.svg b/emacs/notmuch-logo.svg
index 6625e651..b2600ea2 100644
--- a/emacs/notmuch-logo.svg
+++ b/emacs/notmuch-logo.svg
@@ -11,7 +11,7 @@
           L170 220
           A10 10  0  0 0  160 210  L120 210  A10 10  0  0 1  110 200
           L110 200  L102 5 Z" />
-  <g fill="#fff" stroke="#000" stroke-width="2">
+  <g fill="none" stroke="#000" stroke-width="2">
     <rect x="10" y="66" width="60" height="36" />
     <line x1="10" y1="102" x2="32" y2="81" />
     <line x1="70" y1="102" x2="48" y2="81" />

I couldn't see an easy way to set the color in pure svg, but if you
translated your svg into elisp

           https://www.gnu.org/software/emacs/manual/html_node/elisp/SVG-Images.html

then presumably you could interrogate emacs.  I don't know all the
details, but there is some code in "circe" [1] to check the proposed
nick color has a high enough contrast ratio with the background color.

> (did not run (xml) conformity check (just realized should do) -- anyway
> I did not see anything non-conforming there ;D
>

[1]: https://github.com/emacs-circe/circe/blob/77e16de3b9fbaa0417b56a9acc70a9bca17c4ad0/circe-color-nicks.el
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: