Universal file icons: Difference between revisions
Nicole Sharp (talk | contribs) Created page with "Computer file icon sets are typically for only a limited number of filetypes which often exclude rare or unusual filetypes. Whereas here a universal file icon set that will work with any and all filetypes can be defined as follows. == assigning 3-character file extensions == Begin by truncating every file extension to the first three characters. This will create some conflicts such as not being able to distinguish between DOCX and DOCM but since the purpose..." |
Nicole Sharp (talk | contribs) |
||
| Line 3: | Line 3: | ||
== assigning 3-character file extensions == | == assigning 3-character file extensions == | ||
Begin by | Begin by assigning every file extension a three-character name.  For most file extensions with more than three characters, the extension can simply be truncated to the first three characters.  Otherwise, new three-character names will need to be assigned to conflating file extensions.  For example: XLS, XLSX, and XLSM can be assigned as XLS, XLX, and XLM. | ||
One-letter and two-letter file extensions are represented here as three-letter file extensions by adding trailing zeros: M files are represented as "M00" and 7Z files are represented as "7Z0". | One-letter and two-letter file extensions are represented here as three-letter file extensions by adding trailing zeros: M files are represented as "M00" and 7Z files are represented as "7Z0". | ||
Latest revision as of 2026-04-13T08:31:40
Computer file icon sets are typically for only a limited number of filetypes which often exclude rare or unusual filetypes. Whereas here a universal file icon set that will work with any and all filetypes can be defined as follows.
assigning 3-character file extensions
Begin by assigning every file extension a three-character name. For most file extensions with more than three characters, the extension can simply be truncated to the first three characters. Otherwise, new three-character names will need to be assigned to conflating file extensions. For example: XLS, XLSX, and XLSM can be assigned as XLS, XLX, and XLM.
One-letter and two-letter file extensions are represented here as three-letter file extensions by adding trailing zeros: M files are represented as "M00" and 7Z files are represented as "7Z0".
character mapping
Each character from 0 to Z now represents a three-digit hexatrigesimal (base-36) number. Each hexatrigesimal integer from 0 to A has to then be assigned an integer decimal (base-10) value from 0 to 255. These decimal integers are then equal to the values of 0 to FF in hexadecimal (base 16).
| base-36 number | base-10 number | base-10 color | base-16 color |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 7 | 7 |
| 2 | 2 | 15 | F |
| 3 | 3 | 22 | 16 |
| 4 | 4 | 29 | 1D |
| 5 | 5 | 36 | 24 |
| 6 | 6 | 44 | 2C |
| 7 | 7 | 51 | 33 |
| 8 | 8 | 58 | 3A |
| 9 | 9 | 66 | 42 |
| A | 10 | 73 | 49 |
| B | 11 | 80 | 50 |
| C | 12 | 87 | 57 |
| D | 13 | 95 | 5F |
| E | 14 | 102 | 66 |
| F | 15 | 109 | 6D |
| G | 16 | 117 | 75 |
| H | 17 | 124 | 7C |
| I | 18 | 131 | 83 |
| J | 19 | 138 | 8A |
| K | 20 | 146 | 92 |
| L | 21 | 153 | 99 |
| M | 22 | 160 | A0 |
| N | 23 | 168 | A8 |
| O | 24 | 175 | AF |
| P | 25 | 182 | B6 |
| Q | 26 | 189 | Bd |
| R | 27 | 197 | C5 |
| S | 28 | 204 | CC |
| T | 29 | 211 | D3 |
| U | 30 | 219 | DB |
| V | 31 | 226 | E2 |
| W | 32 | 233 | E9 |
| X | 33 | 240 | F0 |
| Y | 34 | 248 | F8 |
| Z | 35 | 255 | FF |
file icon colors
Each three-character file extension from 000 to ZZZ now represents one of 363 = 46656 possible colors from #000000 to #ffffff.
There are still a few problems here, primarily that most file extensions do not contain decimal number characters so about 10/36 = 28% of available colors are under-utilized. The base-36 color space from 0 to Z could be contracted to just base 26 from A to Z but then the characters 0 to 9 will need to be assigned letters.
| filetype | hexcolor | color |
|---|---|---|
#000000
|
||
| 7Z | #33ff00
|
|
| HTM | #7cd3a0
|
|
#b65f6d
|
||
| SVG | #cce275
|
|
| TXT | #d3f0d3
|
|
| XLS | #f099cc
|
|
| ZZZ | #ffffff
|