Hexatrigesimal file icon colors: Difference between revisions
Nicole Sharp (talk | contribs) |
Nicole Sharp (talk | contribs) No edit summary Tag: Reverted |
||
| Line 1: | Line 1: | ||
Computer file icon sets are typically for only a limited number of filetypes which often exclude rare or unusual filetypes.  By assigning a 3-digit hexatrigesimal (base-36) number to each filetype, 36<sup>3</sup> = 46656 unique file icons can be generated. | Computer file icon sets are typically for only a limited number of filetypes which often exclude rare or unusual filetypes.  By assigning a 3-digit hexatrigesimal (base-36) number to each filetype, <notranslate>36<sup>3</sup> = 46656</notranslate> unique file icons can be generated. | ||
== assigning triplets == | == assigning triplets == | ||
Revision as of 2026-04-17T04:16:53
Computer file icon sets are typically for only a limited number of filetypes which often exclude rare or unusual filetypes. By assigning a 3-digit hexatrigesimal (base-36) number to each filetype, <notranslate>363 = 46656</notranslate> unique file icons can be generated.
assigning triplets
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 can now be used to represent a hexatrigesimal number digit. Each hexatrigesimal digit from 0 to Z has to then be assigned an integer decimal (base-10) value from 0 to 255. This series of decimal integers from 0 to 255 are then converted to their corresponding values of 0 to FF in hexadecimal (base 16).
| base-36 number | base-10 number | base-10 value | base-16 value |
|---|---|---|---|
| 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 extensions
Each 3-character base-36 file extension triplet from "000" to "zzz" now represents one of 363 = 46656 possible colors from #000000 to #ffffff.
| extension | triplet | hexcolor | color |
|---|---|---|---|
DefaultIcon
|
000 | #000000
|
|
7z
|
7Z0 | #33ff00
|
|
css
|
CSS | #57cccc
|
|
doc
|
DOC | #5faf57
|
|
docx
|
DOX | #5faff0
|
|
htm
|
HTM | #7cd3a0
|
|
ico
|
ICO | #8357af
|
|
jpg
|
JPG | #8ab675
|
|
mediawiki
|
MED | #a0665f
|
|
mht
|
MHT | #a07cd3
|
|
ods
|
ODS | #af5fcc
|
|
odt
|
ODT | #af5fd3
|
|
oxps
|
OXP | #aff0b6
|
|
pdf
|
#b65f6d
|
||
png
|
PNG | #b6a875
|
|
svg
|
SVG | #cce275
|
|
txt
|
TXT | #d3f0d3
|
|
xht
|
XHT | #f07cd3
|
|
xls
|
XLS | #f099cc
|
|
xlsx
|
XLX | #f099f0
|
|
xml
|
XML | #f0a099
|
|
xps
|
XPS | #f0b6cc
|
|
zip
|
ZIP | #ff83b6
|
|
^^DIRECTORY^^
|
ZZZ | #ffffff
|
problems
There are still a couple of problems here. The first is that most file extensions do not contain decimal number characters so about ten thousand or thirty percent (~10/36) of available colors are under-utilized. An attempt to solve this can be by contracting the hexatrigesimal color space from 036 to Z36 to a hexavigesimal (base-26) color space from A26 to Z26. This results in 263 = 17576 possible colors. But even eliminating 29080 extraneous colors does not help to significantly resolve the second problem in that consecutive colors such as for ".ods" versus ".odt" are extremely difficult to practically impossible to distinguish visually. Even if the human viewer cannot tell the difference though, the assigned colors are still mathematically unique which provides a second semantic signal to indexing bots in addition to the file extension. For practical usage by humans, consecutive file extensions are often for the same application. For example: both ".ods" and ".odt" are for LibreOffice so this still provides a useful semantic cue for the human viewer (as intended) even if these two individual colors cannot be differentiated visually. There may exist other extension pairs though that could be visually conflated but this problem exists with a traditional icon set as well in that with limited icons available, multiple file extensions have to be assigned the same icon.