atomicpoet,
@atomicpoet@atomicpoet.org avatar

Thanks to @deadsuperhero, I now know how to create an SVG logo that changes according to a system theme. Here’s how to do it:

  1. Open the SVG logo in a text editor
  2. Text editor will then display XML code
  3. Look for fill= and a colour hex code (the hex code is identifiable with a “#” prepended to it)
  4. Change the hex code to “currentColor” so that it says fill=”currentColor”
  5. Save

Now your logo will be adjustable according to a webpage’s dark/light theme.

On another note, I just learned that SVG logos are editable with a text editor.

RE: https://atomicpoet.org/objects/daeb8be5-d668-43ff-bc2d-e1a6ae360ea2

benpate,
@benpate@mastodon.social avatar

@atomicpoet

Fantastic hack! And to think I just swapped between duplicate SVGs...

I’ll have to try this with icons, too. I’ve been dying to unload my webfont icons because the font file is soooo big. If this works with a remotely loaded SVG, I’ll be in hog heaven.

Thank you!

me,

@atomicpoet @deadsuperhero I've actually been meaning to do some digging into the SVG file format. I did know it was XML. I want to be able to programmatically create things like graphs and such.

Sure, such libraries probably already exist, but where's the fun in that?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • InstantRegret
  • ngwrru68w68
  • everett
  • Durango
  • osvaldo12
  • rosin
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • Youngstown
  • GTA5RPClips
  • slotface
  • kavyap
  • JUstTest
  • modclub
  • cubers
  • ethstaker
  • tacticalgear
  • khanakhh
  • Leos
  • cisconetworking
  • anitta
  • normalnudes
  • tester
  • megavids
  • provamag3
  • lostlight
  • All magazines