three.js
three.js copied to clipboard
Make icon repsonsive to color scheme preference
I'm not sure if you want this or not but it will make the icon responsive to the user's color preference.
I chose #DDD
instead of #FFF
because if the page didn't set a body/html background color the page will be white and the icon will then be white on white.
Just for my understanding: Where is icon.svg
currently used? It seems this file is not referenced once in the entire repo 🤔 .
yea, it's not. I feel like I saw the logo used somewhere at some point, maybe the docs? Though it's not there now so maybe I have a bad memory. In any case, this is one way to make a responsive diagram/icon
Oh! Can we use svg as favicons now?
I recently implemented favicon color scheme support like this: https://github.com/mrdoob/three.js/commit/c46c105639dbd8981f306afc11412fccac29890d
Seems the browser support is not good enough yet: https://caniuse.com/link-icon-svg
Still, you can use it if you decided to put an image in any docs or the editor or the home page etc....
I'm hesitant about this one...
It'd be like having a gltf that uses different materials depending on prefers-color-scheme
.
What happens if the developer, for whatever reason, doesn't want to add support to prefers-color-scheme
?
I assumed this icon was for the site, not for other developers. So that maybe in the docs or the home page you wanted a logo and you'd like that logo to be responsive to the color scheme just like the page itself is
I know you're not using it for that now.
You could rename it icon-color-scheme-responsive.svg
Closing. Let's change the icon when there is a concrete use case.