Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add white outlines to the logos to look nicer on dark mode #1351

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jaybosamiya-ms
Copy link
Contributor

This PR updates the Verus logos to have white borders to perform this change (screenshots taken in dark mode):

image

Details

I wrote the following filter to wrap around the outermost group of the SVGs for the logos; it essentially merely adds a 2.5 width white-colored dilation around any object where the filter is applied. The width/height of the images needed to be updated to account for this (from 106 -> 106+2x2.5 == 111), but otherwise, no other changes were necessary.

    <filter id="groupborder" filterUnits="userSpaceOnUse" x="0" y="0" width="111" height="111">
      <feOffset in="SourceGraphic" result="input" dx="2.5" dy="2.5" />
      <feOffset in="SourceAlpha" result="inputAlpha" dx="2.5" dy="2.5" />
      <feMorphology operator="dilate" in="inputAlpha" radius="2.5" result="dilated" />
      <feColorMatrix type="matrix" in="dilated"
                     values="-1 0  0  0  1
                             0 -1  0  0  1
                             0  0 -1  0  1
                             0  0  0  1  0" result="whitened"/>
      <feComposite in="input" in2="whitened"
                   operator="over" result="output"/>
    </filter>

Also, I've regenerated the PNGs (via inkscape -w 333 -h 333 verus-color.svg -o verus-color.png, ...; followed by optipng -o7 to squeeze PNG sizes down).

This helps it look nicer on dark-mode, and should not impact light-mode
situations (other than taking up a little padding space around it)
@utaal
Copy link
Collaborator

utaal commented Nov 29, 2024

Thank you for looking into this. Let me look into alternatives to accomplishing readability in dark mode. I find the white outline quite jarring as proposed in this PR.

@tjhance
Copy link
Collaborator

tjhance commented Nov 29, 2024

would it look better if the borders were thinner?

@utaal
Copy link
Collaborator

utaal commented Nov 30, 2024

Screenshot 2024-11-30 at 11 53 38

I pushed a commit that made the title legible in dark mode (that was certainly a necessary improvement, thank you for noticing the issue). I don't think we should add outlines to the primary svgs that we distribute from the "logos" page (they'd for example interfere if someone used them on slides with a light but not white background).

I personally don't mind much that the logo is a bit muted in dark mode, but we could consider variations of the logo colors itself that would work better on a dark background.

@jaybosamiya-ms is the fix on main sufficient for now?
Thank you for noticing the issue, and prompting the change.

@jaybosamiya
Copy link
Contributor

The updates to main look reasonable for now; I think the logo still needs updates for dark mode somehow, but at least with the text not being fully dark, it is less of an issue.

Agreed on the white outline looking a bit jarring, especially on smaller screens (I had originally done it on a larger screen, where it looks more reasonable).

Anyways, next one to be fixed is the GH org logo that blends away into the darkness. It can prob be fixed by just having the org logo having a white background instead?
image

@utaal
Copy link
Collaborator

utaal commented Dec 1, 2024

Regarding the GitHub org logo, a white background should work, I'll give it a shot! Can I close this for now?

@jaybosamiya-ms
Copy link
Contributor Author

jaybosamiya-ms commented Dec 2, 2024

Sure, feel free to close; the main issue is fixed at this point. I'm not closing it right now, as a reminder of the GH org logo test, but once you're done with that, feel free to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants