SublimeText/AFileIcon

How do you change individual icons?

nicknack23 opened this issue · 2 comments

Sorry for spamming, but I promise this is the last issue. :)

I noticed that for web development nearly all relevant file icons are orange: html, js, svelte, txt, gitattributes, gitignore, babelrc, yml - pretty much everything except css and json actually. So I wanted to change color of some of the icons. I tried both swapping out the PNGs and editing icons.json, but none of the changes took. How can this be done?

To make this a real issue, consider this a request to add info about changing individual icons to the README.

Your direction is not totally wrong. Colors (and other metadata) of icons are specified in icons.json. The PNGs are built from SVGs in an offline fashion using python and cairosvg. The latter one ships with a couple of dependencies and even requires manual download of an OS dependend precompiled library on Windows. Thus PNG creation is not easily possible at ST runtime.

  1. Install python
  2. pip install cairosvg
  3. Install cairosvg binary library (https://www.cairographics.org/download)

To update PNGs you may want to call python build -i within A File Icon root directory.

Note: The built scripts are not shipped via Package Control. You'd need to clone the repository.


Of cource you can also use the monochrome PNGs in (icons/single) and tint them via GIMP or whatever.

I see, thanks for the instructions. I'll just build my own version then.