# How to edit 2.8 UI icons?

Blender 2.8 comes with a set of monochromatic icons which seem to be stored inside datafiles/icons/*.dat.

How can these icon files be edited/replaced with other/custom icons? Where is documentation about the icon format and how to compile/generate these *.dat files?

### Summary

(Not official: based on own research)

### Two kinds of icon

I think that "the monochromatic icons", the small ones used in menus etc, are not present as separate files in the compiled releases of Blender because they are compiled in the binary code. By the way, they are not necessarily monochromatic: this isn't "forced" in the code, it's just a design choice made for version 2.80.

The ones that you find under datafiles/icons/*.dat, that come with the built releases, are the (usually colored) ones that are used, for instance, in the tool shelf (see pic below)

So which ones do you want to change?

### To change the small "menu" icons

you will need to recompile blender from source after having updated the blender_icons16/*.dat and blender_icons32/*.dat files in the $SOURCE2.8/release/datafiles/ folder, and to do so you must first edit the vector image $SOURCE2_8/release/datafiles/blender_icons.svg

and then update and make the icons, roughly following this guide (a bit old but I think still valid)

### To change the bigger "tool" icons

I'm not sure how to change the (usually) colored ones that are not compiled into Blender (i.e. the ones that are present as separate .dat files in the downloaded blender builds). They seem to be generated via this blender_icons_geom_update.py script that pulls the design from a icon_geom.blend file that is sadly not present in the repository.

I've found this message that confirms that the process is currently not documented:

«Currently, it’s just a .blend file that generates the icons.

[...] Once we are more finished with the tools we will probably document how people can do this, if anyone wants to make new icons, or change them.»

William Reynish (billreynish), Apr 28 2018

### Documentation?

There is anyway another script: blender_icons_geom.py that contains a documentation of the pixmap format which could be what you are looking for:

This is a simple binary format (all bytes, so no endian).

:0..3: VCO: identifier.
:4: 0: icon file version.
:5: icon size-x.
:6: icon size-y.
:7: icon start-x.
:8: icon start-y.

Icon width and height are for icons that don't use the full byte range
(so we don't get bad alignment for 48 pixel grid for eg).

Start values are currently unused.

After the header, the remaining length of the data defines the geometry size.

:6 bytes each: triangle (XY) locations.
:12 bytes each: triangle (RGBA) locations.

All coordinates are written, then all colors.


cp brush.gpencil_draw.draw.dat ops.mesh.bevel.dat

the "bevel" tool actually becomes a little pencil (this proves that the "tool" icons are read directly from the datafiles/icon folder).