stix2icons is a collection of icons that represent all the of core STIX objects. The aim is to provide a central source of icons that can be used to represent STIX objects by software tools (or anything else).
This repo is designed so that new icons can be added for custom STIX objects you're developing. See: "Adding your own objects".
The icons are provided in three colour versions: color, black, and white.
There are two variations of each colour provided; 1) with (normal) and 2) without a 'circle' (round) behind the icons.
Each icon has an .svg
version and a .png
(256x256) version. Generally you should use the .svg
version and scale as required.
output/
├── black/
│ ├── normal/
│ │ ├── png
│ │ └── svg
│ ├── round/
│ │ ├── png
│ │ └── svg
├── rgb/
│ ├── normal/
│ │ ├── png
│ │ └── svg
│ ├── round/
│ │ ├── png
│ │ └── svg
└── white/
├── normal/
│ ├── png
│ └── svg
└── round/
├── png
└── svg
To start with, clone this repository.
# clone the latest code
git clone https://github.com/muchdogesec/stix2icons
# create a venv
cd stix2icons
python3 -m venv stix2icons-venv
source stix2icons-venv/bin/activate
# install requirements
pip3 install -r requirements.txt
The input_vectors
contains vector files (.svg
s) used to automatically generate types/colours/sizrs in output_files
. The input_vectors
directory is structured as follows;
input_vectors/
├── normal/
│ ├── sco/
│ ├── sdo/
│ └── sro/
└── round/
├── sco/
├── sdo/
└── sro/
Where sco
, sdo
, or sro
is the type of STIX object.
When adding objects you should:
- place it in the the correct type directory (e.g.
sdo
) - supply both a
normal
andround
variation. - keep your
svg
files as simple as possible, using onlypaths
,rect
,circle
, andellipse
tags. This is because theoutput_files
are generated automatically and the script that performs the generation is only smart enough to handle these types.
Once you have added a normal
and round
variation of your object you need to add an entry for it in generate_icons.py
under objects
in the format;
{"object": "<STIX OBJECT>", "type": "<TYPE>", "colour_rgb": "<COLOUR IN R,G,B>"}
e.g.
{"object": "attack-pattern", "type": "sdo", "colour_rgb": "34,119,181"},
Once done, you can then run the script;
python3 generate_icons.py
This will generate a black, white and colour version of your object as an svg
and png
(256x256).
If you want us to publish your icon in this repository for everyone to use, make a pull request after following all the steps above.