The cool thing about it imo (outside of colors) is a `--windows` flag. Which separates the hex view into partitions: so `-w 2:-3:5` shows the first two bytes on a line, then skips three bytes, then shows the next 5 bytes on a line, then the rest of the file. Easy to use combined with a terminal's up arrow.
The post put on the table an interesting point about how to improve the presentation layer to fit whatβs human cognition is good at spotting (in general, or at least for the expected audience with some training). And it does start proposing something with these color schemes. But isnβt it kind of missing the forest for the tree? Actually why do we even have rendering with [012345678ABCDEF], when a specific set of (colored/imaged?) glyphs would be able to make more obvious whatβs on the table? Or even beyond the hexadecimal grouping, wouldnβt be more relevant to render something "intuitively" far more easy to grap without several layer of internalized interpretation through acculturation?
If thatβs true, how does the tool know I will be looking for C0 bytes and not for 03, D3, etc? The logical conclusion of that would be that the hex editor should uniquely color code every byte. And following the other examples even thatβs not enough.
The proposed solution is to create groups of byte values that each get their unique color. I think that helps, but we can do better: add a search feature. That tells your editor what you are looking for. Once you enter a search string, it can highlight all hits.
Yes, βcolorful output in a hexdump is useful for the same reason that syntax highlighting for code is usefulβ, but do you know what syntax highlighting needs? Knowledge of the expected content of a file. Without that, a hex editor at best can guess at how to color-code stuff.
IMO, if you want to add syntax coloring to a hex editor, give it pluggable syntax coloring and heuristics for deciding which one to use when.
While at it, also let those plugins control where to break lines, whether to show hex at all (why show it at all if a file has a few paragraphs of English text or an array of IEEE doubles?), etc.
Those plug-ins will make errors and sometimes, users will want to see all byte values, so youβll need a way for the user to override them.
> Your hex editor should colour-code bytes so it is easier for users to distinguish patterns
> Article is fully in lowercase, which makes it harder for readers to make out sentences and the flow of the article
> mfw the ironyIts a hex editor built with imgui and has a lot of built in tools. Imo the best feature is the data structure editor. You can write a data type definition similar to C and it overlays it on the hexdump and parses it in a structured way while you type.
It also has a node based editor.
Of course none of this helps those using screen-readers and other tech, so make sure that all your fancy colouring & such is additive so if it is all βlostβ no meaning is absolutely lost with it.
--------
[1] Some people can be very vocal about this, more so than if highlighting isn't possible at all. If you give any output formatting they'll expect you to match, or be able to be made to match, their preferred style.
The implicit cost here is that the simple patterns become harder to recognize when every byte is only subtly differently colored. Rather than give everything a different color, I'd rather have the important stuff highlighted.
In the comparisons given, I think hexyl's highlighting scheme is significantly more useful.
color-coding might be a great solution, but you don't really know beforehand which byte values are important. Manually selecting C0 to make it stand out it just ctrl+f with extra steps. (But I wouldn't mind something like "color 00 separate from ascii separate from the rest)
But color would be nice more based on the bytes logic.
Eventually the 00 in a shaded grey instead of black, and in best case scenario by logic unit based on your protocol. And worst case scenario by groups of words or so.
It's been a while since I used hexedit on Linux, but I think that highlighted search results in reverse colours, just like less does for text search. Personally, I'd prefer that to colours.
Don't really see the advantage. Unique bytes have no unique meaning across data types.
The only good syntax highlight to me is 00 and perhaps FF. But that's my opinion of course.
Anything else that has no direct relation to what you're looking at is meaningless.
Of course, if you know about the format, there are better ways, but it goes beyond the scope of a hex editor, though the most advanced ones support things like template files and can display structured data, disassembly, etc...
Another option would be to load data in pandas and display it in a Jupyter notebook with style.background_gradient()
Polars delegate styling to Great Tables, but it's also doable there: https://posit-dev.github.io/great-tables/get-started/coloriz...
So by all means "color everything", people have different opinions on what they want colored so give them option
Most of us have internalized the relationship between digits in [0-9] for a very long time. Adding 6 more glyphs after that is quite easy (and they're also somewhat well known in the world), and after a while you stop even thinking about the glyphs consciously anyway. A hex 'C' intuitively means to me '4 from the end'. A hex 'F' intuitively means to me 'all 4 bits are set to 1'. I don't see any advantage to switching to a different glyph set for this base, other than disruption for disruption's sake.
> Or even beyond the hexadecimal grouping, wouldnβt be more relevant to render something "intuitively" far more easy to grap without several layer of internalized interpretation through acculturation?
Modern computers deal with 8-bit bytes, and their word sizes are a multiple of bytes - unless you're dealing with bit-packed data, which is comparatively rare (closest is bit twiddling of MMIO registers, which is when you sometimes switch to binary; although for a 4-bit hex nibble you can still learn arbitrary combinations of bits on/off into its value).
This means you can group 8 bits into 1 digits of 8 bits as one glyph (alphabet too large to be useful), 2 digits of 4 (hex), 4 digits of 2 (alphabet too small to give a benefit over binary) and 8 digits of 1 (binary). Hex just works really well as a practical middle ground.
Back when computers used 12 bit words (PDP-8 and friends) octal (4 digits of 3 bits represented in the 0-7 alphabet) was more popular.
They've been absolutely invaluable for making sure their kind of people can't use my apps properly.
Interesting idea. So even syntaxβhighlighting natural language. Grammar highlighting, as it were. Prepositions, verbs, question marks, etc. An LLM could do it. Would it actually improve readability though? Seems likely!
That's not what they did, actually. C0 is the only byte in there that's above 3F or so, and it's far from it. Hence the very different colour, and the lack of contrast between the colours of the other bytes.
Would probably make the most sense to have various ranges you can enable depending on what youβre looking for (or to look for patterns) e.g. for single byte coloration I could see
- nul
- printable / non-printable ascii
- non-ascii
- UTF8 leading / continuation
- separators
- start/end pairs (both printable and non printable)
As a note, the some up there is load-bearing - color may lull you into complacency where the difference between 01 and 0F is major and important but not highlighted. More complicated regex built color tools designed to highlight "anomalies" could be developed but then you need to define what anomalies are (patters, places where a pattern changes, etc).
excuse me? "basic" and "runs in your browser" together sound very contradictory to me. while doing things i actually feel (yes, emotionally) much better when there is no browser open on my machine, but only text editors, vcs gui and file managers, and terminals of course. and sometimes i reject an idea to start a browser just thinking how much ram it will take (ha, what a progress we have done - one github issue tab, with text only and no images, takes 180mb of ram).
Then byte was represented as 16x16 matrix where each 4x4 area had the lower digit pattern, and these were arranged in the shape of the higher digit.
But at the end of the day, it wasn't really more readable.
It is not a fun condition to have, and leads to lots of problems in my everyday life. This blog post accidentally accentuated that issue, since the colors are (to what I can understand) very similar looking to me as a colorblind person.
1 in 12 men and 1 in 200 women go through the same sorts of experiences, and itβs worth it, if you arenβt color deficient, to try out some of the colorblindness sites and see the world as we do.
https://www.colourblindawareness.org/colour-blindness/colour...
https://www.color-blindness.com/coblis-color-blindness-simul...
.. to get an idea of the impact of your UI design on color-limited folks out there ..
I used this a few times to great effect, it was very revealing to see that my carefully selected teals and ambers were incomprehensible to some folks I really wanted to use my apps .. didn't take much iteration to come to a happy palette though, just needed a bit of care.
Here's Claud attacking your post:
Not the same, it's a gradient.
alice pellerin β’ 2026-03-31
too often, i see hex editors1 that look like this:
00000000 00 00 02 00 28 00 00 00 88 15 00 00 C4 01 00 00 βββ’β(βββΓβ’ββΓβ’ββ
00000010 14 00 00 00 03 00 00 00 00 01 00 00 03 00 00 00 β’ββββ’βββββ’βββ’βββ
00000020 3C 00 00 00 C4 0A 00 00 50 00 00 00 18 00 00 00 <βββΓβββPββββ’βββ
00000030 14 00 00 10 00 00 00 00 18 00 00 20 00 00 00 00 β’βββ’βββββ’ββ ββββ
00000040 20 00 00 30 00 00 00 00 51 00 00 00 48 00 00 00 ββ0ββββQβββHβββ
00000050 10 00 00 80 00 00 00 00 00 00 00 A0 00 00 00 00 β’ββΓβββββββΓββββ
00000060 01 00 00 A0 01 00 00 00 02 00 00 A0 02 00 00 00 β’ββΓβ’ββββ’ββΓβ’βββ
00000070 03 00 00 A0 03 00 00 00 04 00 00 A0 04 00 00 00 β’ββΓβ’ββββ’ββΓβ’βββ
00000080 05 00 00 A0 05 00 00 00 06 00 00 A0 06 00 00 00 β’ββΓβ’ββββ’ββΓβ’βββ
00000090 20 00 00 30 00 00 00 00 53 00 00 00 00 DE 00 00 ββ0ββββSββββΓββ
000000a0 5D FA 01 44 E1 3A 9A 0F 52 00 00 00 FC 14 00 00 ]Γβ’DΓ:Γβ’RβββΓβ’ββ
000000b0 1B 20 2A 2B 00 80 00 00 00 80 00 00 00 80 00 00 β’ *+βΓβββΓβββΓββ
000000c0 FF 7F 00 00 00 00 33 52 00 00 00 00 29 10 15 10 β³β’ββββ3Rββββ)β’β’β’
000000d0 80 00 1F 00 03 00 00 00 02 00 00 00 40 14 22 23 Γββ’ββ’ββββ’βββ@β’"#
000000e0 03 00 00 00 06 00 00 00 23 00 9D 05 6B FA C0 05 β’ββββ’βββ#βΓβ’kΓΓβ’
000000f0 C8 03 00 00 14 22 23 14 05 00 00 00 2E 00 9E 06 Γβ’βββ’"#β’β’βββ.βΓβ’
every time i do, i feel bad for the poor person having to use it (especially if that person is me!). a plain list of bytes makes it hard to notice interesting things in the data. go ahead, try to find the single C0 in these bytes:
00000000 15 29 21 25 03 2F 2E 2B 15 11 24 3F 10 14 3B 13 β’)!%β’/.+β’β’$?β’β’;β’
00000001 32 25 09 01 10 02 01 23 26 1E 25 2D 24 2F 23 3E 2%β£β’β’β’β’#&β’%-$/#>
00000002 05 0F 33 2D 18 29 3E 1E 16 3B 29 0D 24 0B 3E 38 β’β’3-β’)>β’β’;)β$β’>8
00000003 33 3C 1E 2C 28 31 C0 1D 11 32 14 05 10 17 3F 01 3<β’,(1Γβ’β’2β’β’β’β’?β’
00000004 1E 32 0A 14 2B 2F 0B 14 3E 27 39 0A 17 23 1B 39 β’2ββ’+/β’β’>'9ββ’#β’9
00000005 18 0B 3B 13 25 14 2C 3B 33 3C 19 10 21 0F 2C 34 β’β’;β’%β’,;3<β’β’!β’,4
00000006 2F 0C 1D 2C 2E 22 11 28 0D 0A 1F 37 27 39 35 21 /β’β’,."β’(βββ’7'95!
00000007 23 39 21 2B 37 23 28 16 30 28 02 04 25 22 37 1F #9!+7#(β’0(β’β’%"7β’
00000008 36 2F 2D 25 12 25 01 31 3B 39 2D 35 26 37 30 2A 6/-%β’%β’1;9-5&70*
00000009 06 0D 11 1F 25 0A 1E 29 15 0B 0A 2A 2E 2C 21 16 β’ββ’β’%ββ’)β’β’β*.,!β’
0000000a 1D 37 0F 16 12 03 2C 02 0B 22 24 11 1A 3B 0D 0B β’7β’β’β’β’,β’β’"$β’β’;ββ’
0000000b 0D 13 30 2D 3B 15 05 15 32 19 20 30 3C 0E 3D 0B ββ’0-;β’β’β’2β’ 0<β’=β’
0000000c 17 24 22 3E 1E 22 18 0D 21 06 29 38 3E 20 3B 12 β’$">β’"β’β!β’)8> ;β’
0000000d 06 1F 19 17 29 35 1E 3B 1E 01 31 08 13 0C 27 20 β’β’β’β’)5β’;β’β’1β’β’β’'
0000000e 08 24 2E 32 16 06 1F 3D 35 35 19 16 02 07 31 13 β’$.2β’β’β’=55β’β’β’β’1β’
0000000f 31 33 30 36 14 32 07 05 05 34 19 0B 18 16 12 3C 1306β’2β’β’β’4β’β’β’β’β’<
compare that to one with colors:
00000000 37 2D 08 13 0D 0B 18 1D 02 1A 2D 12 2A 0D 0F 27 7-β’β’ββ’β’β’β’β’-β’*ββ’'
00000001 04 2A 25 32 0F 17 32 11 2F 2A 2A 0A 0A 16 04 1D β’*%2β’β’2β’/**βββ’β’β’
00000002 32 13 09 01 2B 26 1A 30 3D 26 13 39 09 0D 38 3E 2β’β£β’+&β’0=&β’9β£β8>
00000003 0A 0D 1D 0B 36 30 02 36 0E 0B 2F 09 26 1E 33 03 βββ’β’60β’6β’β’/β£&β’3β’
00000004 3C 3C 08 0A 1E 36 12 11 1B 17 05 09 0B 37 0C 0E <<β’ββ’6β’β’β’β’β’β£β’7β’β’
00000005 31 05 09 17 2D 1D 05 16 25 03 3E 0A 1A 01 0C 2B 1β’β£β’-β’β’β’%β’>ββ’β’β’+
00000006 13 37 17 14 37 03 18 34 2D 03 30 11 2B 19 04 0B β’7β’β’7β’β’4-β’0β’+β’β’β’
00000007 04 2A 18 26 21 25 3F 23 1D 0F 2F 2B 35 0C 09 37 β’*β’&!%?#β’β’/+5β’β£7
00000008 25 33 19 1C 12 1E 2E 38 3A 3A 3C 28 39 0A 30 23 %3β’β’β’β’.8::<(9β0#
00000009 21 08 09 24 0B 0E 13 26 04 30 06 20 10 18 15 3C !β’β£$β’β’β’&β’0β’ β’β’β’<
0000000a 10 3C 30 34 28 28 1D 31 22 23 22 38 0E 12 25 15 β’<04((β’1"#"8β’β’%β’
0000000b 3B 1F 30 0D 26 0E 15 32 1C 2B 12 1A 32 1C 02 07 ;β’0β&β’β’2β’+β’β’2β’β’β’
0000000c 35 2E 06 13 1F 33 3D 16 05 1C 2A 0F 34 34 21 26 5.β’β’β’3=β’β’β’*β’44!&
0000000d 0C 17 3D 02 27 39 21 17 3F 07 1A 2F 38 0D 2D 1E β’β’=β’'9!β’?β’β’/8β-β’
0000000e 32 0C C0 14 0E 20 25 0E 2E 2D 0D 21 27 13 2C 07 2β’Γβ’β’ %β’.-β!'β’,β’
0000000f 14 0A 20 31 15 13 2C 3B 0F 12 1A 2D 0C 11 32 11 β’β 1β’β’,;β’β’β’-β’β’2β’
itβs much easier to pick out the unique byte when itβs a different color! human brains are really good at spotting visual patternsβgiven the right format
here are a few more examples:
no color
00000000 4B 50 53 00 0A 00 00 00 0C 00 00 00 01 00 00 00 KPSββββββ’ββββ’βββ
00000010 00 00 00 00 B4 00 00 00 46 00 00 00 64 00 00 00 ββββΓβββFβββdβββ
00000020 46 00 00 00 02 00 00 00 00 00 00 00 DC 00 00 00 Fββββ’βββββββΓβββ
00000030 50 00 00 00 A0 00 00 00 50 00 00 00 03 00 00 00 PβββΓβββPββββ’βββ
00000040 00 00 00 00 FA 00 00 00 5A 00 00 00 B4 00 00 00 ββββΓβββZβββΓβββ
00000050 5A 00 00 00 04 00 00 00 00 00 00 00 18 01 00 00 Zββββ’ββββββββ’β’ββ
00000060 64 00 00 00 C8 00 00 00 64 00 00 00 05 00 00 00 dβββΓβββdββββ’βββ
00000070 00 00 00 00 4A 01 00 00 78 00 00 00 F0 00 00 00 ββββJβ’ββxβββΓβββ
00000080 78 00 00 00 06 00 00 00 00 00 00 00 90 01 00 00 xββββ’βββββββΓβ’ββ
00000090 8C 00 00 00 18 01 00 00 8C 00 00 00 07 00 00 00 Γββββ’β’ββΓββββ’βββ
000000a0 00 00 00 00 F4 01 00 00 B4 00 00 00 68 01 00 00 ββββΓβ’ββΓβββhβ’ββ
000000b0 B4 00 00 00 08 00 00 00 00 00 00 00 58 02 00 00 Γββββ’βββββββXβ’ββ
000000c0 DC 00 00 00 B8 01 00 00 DC 00 00 00 09 00 00 00 ΓβββΓβ’ββΓββββ£βββ
000000d0 E7 03 00 00 E7 03 00 00 00 00 00 00 E7 03 00 00 Γβ’ββΓβ’ββββββΓβ’ββ
000000e0 E7 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Γβ’ββββββββββββββ
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 ββββββββββββ
color
00000000 4B 50 53 00 0A 00 00 00 0C 00 00 00 01 00 00 00 KPSββββββ’ββββ’βββ
00000010 00 00 00 00 B4 00 00 00 46 00 00 00 64 00 00 00 ββββΓβββFβββdβββ
00000020 46 00 00 00 02 00 00 00 00 00 00 00 DC 00 00 00 Fββββ’βββββββΓβββ
00000030 50 00 00 00 A0 00 00 00 50 00 00 00 03 00 00 00 PβββΓβββPββββ’βββ
00000040 00 00 00 00 FA 00 00 00 5A 00 00 00 B4 00 00 00 ββββΓβββZβββΓβββ
00000050 5A 00 00 00 04 00 00 00 00 00 00 00 18 01 00 00 Zββββ’ββββββββ’β’ββ
00000060 64 00 00 00 C8 00 00 00 64 00 00 00 05 00 00 00 dβββΓβββdββββ’βββ
00000070 00 00 00 00 4A 01 00 00 78 00 00 00 F0 00 00 00 ββββJβ’ββxβββΓβββ
00000080 78 00 00 00 06 00 00 00 00 00 00 00 90 01 00 00 xββββ’βββββββΓβ’ββ
00000090 8C 00 00 00 18 01 00 00 8C 00 00 00 07 00 00 00 Γββββ’β’ββΓββββ’βββ
000000a0 00 00 00 00 F4 01 00 00 B4 00 00 00 68 01 00 00 ββββΓβ’ββΓβββhβ’ββ
000000b0 B4 00 00 00 08 00 00 00 00 00 00 00 58 02 00 00 Γββββ’βββββββXβ’ββ
000000c0 DC 00 00 00 B8 01 00 00 DC 00 00 00 09 00 00 00 ΓβββΓβ’ββΓββββ£βββ
000000d0 E7 03 00 00 E7 03 00 00 00 00 00 00 E7 03 00 00 Γβ’ββΓβ’ββββββΓβ’ββ
000000e0 E7 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Γβ’ββββββββββββββ
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 ββββββββββββ
this file starts with the magic bytes KPS, then a bunch of (little-endian) 32-bit integers that range from 0 to 999 (0x3E7). the colors make it quick to recognize that every 32-bit integer is relatively small, as the two high bytes are always 00 00. if you look closely, you may notice other patterns, like the numbers counting up every 0x18 bytes starting at 0xC
if you're curious about this particular file format, the code that parses it is pretty simple, even if you're not a programmer. there's even a wiki page for the data it represents, if you're into Fossil Fighters
no color
00000000 44 41 4C 00 59 06 00 00 F4 07 00 00 F5 01 00 00 DALβYβ’ββΓβ’ββΓβ’ββ
00000010 14 00 00 00 E8 07 00 00 08 08 00 00 44 08 00 00 β’βββΓβ’βββ’β’ββDβ’ββ
00000020 84 08 00 00 C8 08 00 00 04 09 00 00 40 09 00 00 Γβ’ββΓβ’βββ’β£ββ@β£ββ
00000030 7C 09 00 00 B8 09 00 00 F8 09 00 00 34 0A 00 00 |β£ββΓβ£ββΓβ£ββ4βββ
00000040 70 0A 00 00 AC 0A 00 00 EC 0A 00 00 30 0B 00 00 pβββΓβββΓβββ0β’ββ
00000050 6C 0B 00 00 A8 0B 00 00 E8 0B 00 00 24 0C 00 00 lβ’ββΓβ’ββΓβ’ββ$β’ββ
00000060 60 0C 00 00 9C 0C 00 00 D8 0C 00 00 14 0D 00 00 `β’ββΓβ’ββΓβ’βββ’βββ
00000070 50 0D 00 00 8C 0D 00 00 CC 0D 00 00 08 0E 00 00 PβββΓβββΓββββ’β’ββ
00000080 48 0E 00 00 84 0E 00 00 C4 0E 00 00 08 0F 00 00 Hβ’ββΓβ’ββΓβ’βββ’β’ββ
00000090 44 0F 00 00 80 0F 00 00 C0 0F 00 00 04 10 00 00 Dβ’ββΓβ’ββΓβ’βββ’β’ββ
000000a0 40 10 00 00 80 10 00 00 C4 10 00 00 00 11 00 00 @β’ββΓβ’ββΓβ’ββββ’ββ
000000b0 3C 11 00 00 7C 11 00 00 B8 11 00 00 F4 11 00 00 <β’ββ|β’ββΓβ’ββΓβ’ββ
000000c0 34 12 00 00 70 12 00 00 B0 12 00 00 F4 12 00 00 4β’ββpβ’ββΓβ’ββΓβ’ββ
000000d0 30 13 00 00 70 13 00 00 B4 13 00 00 F0 13 00 00 0β’ββpβ’ββΓβ’ββΓβ’ββ
000000e0 2C 14 00 00 68 14 00 00 A4 14 00 00 E4 14 00 00 ,β’ββhβ’ββΓβ’ββΓβ’ββ
000000f0 20 15 00 00 5C 15 00 00 9C 15 00 00 E0 15 00 00 β’ββ\β’ββΓβ’ββΓβ’ββ
00000100 1C 16 00 00 58 16 00 00 98 16 00 00 DC 16 00 00 β’β’ββXβ’ββΓβ’ββΓβ’ββ
00000110 18 17 00 00 58 17 00 00 9C 17 00 00 D8 17 00 00 β’β’ββXβ’ββΓβ’ββΓβ’ββ
00000120 14 18 00 00 54 18 00 00 90 18 00 00 D0 18 00 00 β’β’ββTβ’ββΓβ’ββΓβ’ββ
00000130 14 19 00 00 50 19 00 00 8C 19 00 00 C8 19 00 00 β’β’ββPβ’ββΓβ’ββΓβ’ββ
00000140 04 1A 00 00 40 1A 00 00 7C 1A 00 00 B8 1A 00 00 β’β’ββ@β’ββ|β’ββΓβ’ββ
00000150 F4 1A 00 00 30 1B 00 00 6C 1B 00 00 AC 1B 00 00 Γβ’ββ0β’ββlβ’ββΓβ’ββ
00000160 F0 1B 00 00 2C 1C 00 00 68 1C 00 00 A8 1C 00 00 Γβ’ββ,β’ββhβ’ββΓβ’ββ
00000170 EC 1C 00 00 28 1D 00 00 68 1D 00 00 AC 1D 00 00 Γβ’ββ(β’ββhβ’ββΓβ’ββ
00000180 E8 1D 00 00 28 1E 00 00 6C 1E 00 00 A8 1E 00 00 Γβ’ββ(β’ββlβ’ββΓβ’ββ
00000190 E8 1E 00 00 2C 1F 00 00 68 1F 00 00 A8 1F 00 00 Γβ’ββ,β’ββhβ’ββΓβ’ββ
000001a0 EC 1F 00 00 28 20 00 00 68 20 00 00 AC 20 00 00 Γβ’ββ( ββh ββΓ ββ
000001b0 E8 20 00 00 30 21 00 00 6C 21 00 00 A8 21 00 00 Γ ββ0!ββl!ββΓ!ββ
000001c0 E4 21 00 00 24 22 00 00 68 22 00 00 A4 22 00 00 Γ!ββ$"ββh"ββΓ"ββ
000001d0 E0 22 00 00 1C 23 00 00 5C 23 00 00 A0 23 00 00 Γ"βββ’#ββ\#ββΓ#ββ
000001e0 DC 23 00 00 18 24 00 00 58 24 00 00 9C 24 00 00 Γ#βββ’$ββX$ββΓ$ββ
000001f0 D8 24 00 00 18 25 00 00 54 25 00 00 94 25 00 00 Γ$βββ’%ββT%ββΓ%ββ
00000200 D8 25 00 00 14 26 00 00 54 26 00 00 90 26 00 00 Γ%βββ’&ββT&ββΓ&ββ
...
color
00000000 44 41 4C 00 59 06 00 00 F4 07 00 00 F5 01 00 00 DALβYβ’ββΓβ’ββΓβ’ββ
00000010 14 00 00 00 E8 07 00 00 08 08 00 00 44 08 00 00 β’βββΓβ’βββ’β’ββDβ’ββ
00000020 84 08 00 00 C8 08 00 00 04 09 00 00 40 09 00 00 Γβ’ββΓβ’βββ’β£ββ@β£ββ
00000030 7C 09 00 00 B8 09 00 00 F8 09 00 00 34 0A 00 00 |β£ββΓβ£ββΓβ£ββ4βββ
00000040 70 0A 00 00 AC 0A 00 00 EC 0A 00 00 30 0B 00 00 pβββΓβββΓβββ0β’ββ
00000050 6C 0B 00 00 A8 0B 00 00 E8 0B 00 00 24 0C 00 00 lβ’ββΓβ’ββΓβ’ββ$β’ββ
00000060 60 0C 00 00 9C 0C 00 00 D8 0C 00 00 14 0D 00 00 `β’ββΓβ’ββΓβ’βββ’βββ
00000070 50 0D 00 00 8C 0D 00 00 CC 0D 00 00 08 0E 00 00 PβββΓβββΓββββ’β’ββ
00000080 48 0E 00 00 84 0E 00 00 C4 0E 00 00 08 0F 00 00 Hβ’ββΓβ’ββΓβ’βββ’β’ββ
00000090 44 0F 00 00 80 0F 00 00 C0 0F 00 00 04 10 00 00 Dβ’ββΓβ’ββΓβ’βββ’β’ββ
000000a0 40 10 00 00 80 10 00 00 C4 10 00 00 00 11 00 00 @β’ββΓβ’ββΓβ’ββββ’ββ
000000b0 3C 11 00 00 7C 11 00 00 B8 11 00 00 F4 11 00 00 <β’ββ|β’ββΓβ’ββΓβ’ββ
000000c0 34 12 00 00 70 12 00 00 B0 12 00 00 F4 12 00 00 4β’ββpβ’ββΓβ’ββΓβ’ββ
000000d0 30 13 00 00 70 13 00 00 B4 13 00 00 F0 13 00 00 0β’ββpβ’ββΓβ’ββΓβ’ββ
000000e0 2C 14 00 00 68 14 00 00 A4 14 00 00 E4 14 00 00 ,β’ββhβ’ββΓβ’ββΓβ’ββ
000000f0 20 15 00 00 5C 15 00 00 9C 15 00 00 E0 15 00 00 β’ββ\β’ββΓβ’ββΓβ’ββ
00000100 1C 16 00 00 58 16 00 00 98 16 00 00 DC 16 00 00 β’β’ββXβ’ββΓβ’ββΓβ’ββ
00000110 18 17 00 00 58 17 00 00 9C 17 00 00 D8 17 00 00 β’β’ββXβ’ββΓβ’ββΓβ’ββ
00000120 14 18 00 00 54 18 00 00 90 18 00 00 D0 18 00 00 β’β’ββTβ’ββΓβ’ββΓβ’ββ
00000130 14 19 00 00 50 19 00 00 8C 19 00 00 C8 19 00 00 β’β’ββPβ’ββΓβ’ββΓβ’ββ
00000140 04 1A 00 00 40 1A 00 00 7C 1A 00 00 B8 1A 00 00 β’β’ββ@β’ββ|β’ββΓβ’ββ
00000150 F4 1A 00 00 30 1B 00 00 6C 1B 00 00 AC 1B 00 00 Γβ’ββ0β’ββlβ’ββΓβ’ββ
00000160 F0 1B 00 00 2C 1C 00 00 68 1C 00 00 A8 1C 00 00 Γβ’ββ,β’ββhβ’ββΓβ’ββ
00000170 EC 1C 00 00 28 1D 00 00 68 1D 00 00 AC 1D 00 00 Γβ’ββ(β’ββhβ’ββΓβ’ββ
00000180 E8 1D 00 00 28 1E 00 00 6C 1E 00 00 A8 1E 00 00 Γβ’ββ(β’ββlβ’ββΓβ’ββ
00000190 E8 1E 00 00 2C 1F 00 00 68 1F 00 00 A8 1F 00 00 Γβ’ββ,β’ββhβ’ββΓβ’ββ
000001a0 EC 1F 00 00 28 20 00 00 68 20 00 00 AC 20 00 00 Γβ’ββ( ββh ββΓ ββ
000001b0 E8 20 00 00 30 21 00 00 6C 21 00 00 A8 21 00 00 Γ ββ0!ββl!ββΓ!ββ
000001c0 E4 21 00 00 24 22 00 00 68 22 00 00 A4 22 00 00 Γ!ββ$"ββh"ββΓ"ββ
000001d0 E0 22 00 00 1C 23 00 00 5C 23 00 00 A0 23 00 00 Γ"βββ’#ββ\#ββΓ#ββ
000001e0 DC 23 00 00 18 24 00 00 58 24 00 00 9C 24 00 00 Γ#βββ’$ββX$ββΓ$ββ
000001f0 D8 24 00 00 18 25 00 00 54 25 00 00 94 25 00 00 Γ$βββ’%ββT%ββΓ%ββ
00000200 D8 25 00 00 14 26 00 00 54 26 00 00 90 26 00 00 Γ%βββ’&ββT&ββΓ&ββ
...
this excerpt, starting at 0x14, has a long series of increasing 32-bit integers (little-endian again). each one is an index to a later point in the file, to a structure usually about 0x3C bytes long. the roughly-evenly-spaced indices make for some very pretty rainbow gradients
no color
...
00000030 0F 80 00 00 00 01 C1 82 82 83 01 05 04 82 03 82 β’Γββββ’ΓΓΓΓβ’β’β’Γβ’Γ
00000040 0F 82 07 C2 0C C2 0B 82 0A 0D 08 02 09 C0 0E 06 β’Γβ’Γβ’Γβ’Γβββ’β’β£Γβ’β’
00000050 56 05 E8 43 01 64 52 F5 A4 8D A1 33 D5 98 BF C6 Vβ’ΓCβ’dRΓΓΓΓ3ΓΓΓΓ
00000060 63 EB 4C 8C C6 C3 F8 1A 6A 2A 46 2B C5 F8 15 F3 cΓLΓΓΓΓβ’j*F+ΓΓβ’Γ
00000070 60 42 8A 71 E6 56 0C 2A D5 4C 0C 2B 5F 31 A9 18 `BΓqΓVβ’*ΓLβ’+_1Γβ’
00000080 4C 8C 55 CC 5B 30 C6 D6 18 37 86 7D BB C3 8F CD LΓUΓ[0ΓΓβ’7Γ}ΓΓΓΓ
00000090 1E B9 BB BB 91 FA 22 23 9E 71 7A 8B 35 6F F3 84 β’ΓΓΓΓΓ"#ΓqzΓ5oΓΓ
000000a0 38 DE B7 C9 58 76 A4 9C D7 C5 F8 63 CF A2 B4 BE 8ΓΓΓXvΓΓΓΓΓcΓΓΓΓ
000000b0 B2 45 BC 8D F7 6A 35 EF E2 B9 CD A7 46 F7 F9 AD ΓEΓΓΓj5ΓΓΓΓΓFΓΓΓ
000000c0 7F 6F D7 BC 72 DD DB 9D 6B DE 8F EE C6 35 EF B7 β’oΓΓrΓΓΓkΓΓΓΓ5ΓΓ
000000d0 AE 6B E4 9A AE E9 9B 6B AF 23 8E 66 B0 2D 22 47 ΓkΓΓΓΓΓkΓ#ΓfΓ-"G
color
...
00000030 0F 80 00 00 00 01 C1 82 82 83 01 05 04 82 03 82 β’Γββββ’ΓΓΓΓβ’β’β’Γβ’Γ
00000040 0F 82 07 C2 0C C2 0B 82 0A 0D 08 02 09 C0 0E 06 β’Γβ’Γβ’Γβ’Γβββ’β’β£Γβ’β’
00000050 56 05 E8 43 01 64 52 F5 A4 8D A1 33 D5 98 BF C6 Vβ’ΓCβ’dRΓΓΓΓ3ΓΓΓΓ
00000060 63 EB 4C 8C C6 C3 F8 1A 6A 2A 46 2B C5 F8 15 F3 cΓLΓΓΓΓβ’j*F+ΓΓβ’Γ
00000070 60 42 8A 71 E6 56 0C 2A D5 4C 0C 2B 5F 31 A9 18 `BΓqΓVβ’*ΓLβ’+_1Γβ’
00000080 4C 8C 55 CC 5B 30 C6 D6 18 37 86 7D BB C3 8F CD LΓUΓ[0ΓΓβ’7Γ}ΓΓΓΓ
00000090 1E B9 BB BB 91 FA 22 23 9E 71 7A 8B 35 6F F3 84 β’ΓΓΓΓΓ"#ΓqzΓ5oΓΓ
000000a0 38 DE B7 C9 58 76 A4 9C D7 C5 F8 63 CF A2 B4 BE 8ΓΓΓXvΓΓΓΓΓcΓΓΓΓ
000000b0 B2 45 BC 8D F7 6A 35 EF E2 B9 CD A7 46 F7 F9 AD ΓEΓΓΓj5ΓΓΓΓΓFΓΓΓ
000000c0 7F 6F D7 BC 72 DD DB 9D 6B DE 8F EE C6 35 EF B7 β’oΓΓrΓΓΓkΓΓΓΓ5ΓΓ
000000d0 AE 6B E4 9A AE E9 9B 6B AF 23 8E 66 B0 2D 22 47 ΓkΓΓΓΓΓkΓ#ΓfΓ-"G
this data is compressed using a Huffman code, specifically one compatible with the Nintendo DS BIOS. it starts with 0x20 bytes encoding the Huffman tree used, then 0x90 bytes of compressed bitstreamβthe actual compressed file contents
there's a big difference between the two parts that can be hard to notice without the help of colors. the tree mostly has bytes in the range 00β0F (plus some low 80s and C0s), but the bitstream has bytes evenly distributed throughout the entire range of 00βFF
the bitstream is much more colorful and chaotic because good compression algorithms output data that looks visually random. ideally, any patterns you would've noticed in the data were already found by the algorithm, and then used to make the compressed output smaller
no color
...
00000028 00 00 00 00 00 00 00 00 88 00 00 00 00 00 00 00 ββββββββΓβββββββ
00000038 00 00 00 00 80 80 80 78 46 77 80 08 00 00 00 00 ββββΓΓΓxFwΓβ’ββββ
00000048 00 00 00 00 88 44 68 12 21 55 46 74 00 00 00 00 ββββΓDhβ’!UFtββββ
00000058 00 00 00 70 25 41 33 53 65 13 54 54 08 00 00 00 βββp%A3Seβ’TTβ’βββ
00000068 00 00 70 27 22 13 43 B7 9B 67 54 32 76 08 00 00 ββp'"β’CΓΓgT2vβ’ββ
00000078 00 00 26 22 76 76 98 BA AA BA 59 21 44 75 00 00 ββ&"vvΓΓΓΓY!Duββ
00000088 00 80 D2 71 99 AA 99 AA A9 AB 99 88 48 43 85 00 βΓΓqΓΓΓΓΓΓΓΓHCΓβ
00000098 00 60 12 A5 A9 9A 99 A9 AA 99 99 CA 48 55 07 00 β`β’ΓΓΓΓΓΓΓΓΓHUβ’β
000000a8 00 38 42 B9 AA 99 9A A9 99 99 89 88 77 78 88 00 β8BΓΓΓΓΓΓΓΓΓwxΓβ
000000b8 00 36 86 AA 99 99 B9 AA AA 99 78 78 77 46 75 00 β6ΓΓΓΓΓΓΓΓxxwFuβ
000000c8 80 67 66 A9 99 A9 AA BB BB AA 78 67 57 44 02 08 ΓgfΓΓΓΓΓΓΓxgWDβ’β’
000000d8 80 23 45 98 A9 AB CB BB BB AA 89 77 57 12 95 00 Γ#EΓΓΓΓΓΓΓΓwWβ’Γβ
000000e8 58 2E 55 98 99 BA BB CC BB AB 79 67 56 54 98 00 X.UΓΓΓΓΓΓΓygVTΓβ
000000f8 50 52 87 AA A9 BA BB BB CB BB 89 66 56 55 97 00 PRΓΓΓΓΓΓΓΓΓfVUΓβ
00000108 48 43 A5 AA BA BB CC CC CB 9A 88 66 55 34 84 00 HCΓΓΓΓΓΓΓΓΓfU4Γβ
00000118 70 44 A8 99 B9 CB CC CC AC 8A 56 45 55 33 05 08 pDΓΓΓΓΓΓΓΓVEU3β’β’
00000128 00 77 CB A9 AA BC CC CC BC 69 45 43 43 22 A5 08 βwΓΓΓΓΓΓΓiECC"Γβ’
00000138 80 67 A8 99 BA BB BC CC AB 58 44 33 32 43 A8 00 ΓgΓΓΓΓΓΓΓXD32CΓβ
00000148 00 34 74 A9 AA BB BB BB 7A 45 23 22 23 41 99 08 β4tΓΓΓΓΓzE#"#AΓβ’
00000158 80 46 74 99 99 AA BA AC 7A 34 22 12 23 41 87 80 ΓFtΓΓΓΓΓz4"β’#AΓΓ
00000168 00 17 52 99 89 AA AA BB 58 34 23 21 E2 4E A7 09 ββ’RΓΓΓΓΓX4#!ΓNΓβ£
00000178 00 36 73 99 99 98 98 A9 68 35 22 12 12 4E A9 00 β6sΓΓΓΓΓh5"β’β’NΓβ
00000188 70 44 88 87 99 88 78 88 66 45 32 21 E1 62 AA 07 pDΓΓΓΓxΓfE2!ΓbΓβ’
00000198 70 86 69 65 88 88 68 77 56 44 23 12 21 A7 0A 00 pΓieΓΓhwVD#β’!Γββ
000001a8 00 90 57 52 85 77 77 66 66 44 33 D1 42 99 00 00 βΓWRΓwwffD3ΓBΓββ
000001b8 00 00 70 56 41 55 65 67 54 35 12 21 63 09 00 00 ββpVAUegT5β’!cβ£ββ
000001c8 00 00 00 8A 44 32 22 22 1E 11 12 43 85 80 00 00 βββΓD2""β’β’β’CΓΓββ
000001d8 00 00 80 A0 57 55 12 EE 2F 22 32 54 85 08 00 00 ββΓΓWUβ’Γ/"2TΓβ’ββ
000001e8 00 00 00 80 99 57 33 45 75 57 66 78 A8 00 00 00 βββΓΓW3EuWfxΓβββ
000001f8 00 00 00 00 08 99 A9 0A 9A A0 A9 9A 08 00 00 00 βββββ’ΓΓβΓΓΓΓβ’βββ
00000208 00 00 00 00 00 90 80 00 80 00 87 80 00 00 00 00 βββββΓΓβΓβΓΓββββ
00000218 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ββββββββββββββββ
...
color
...
00000028 00 00 00 00 00 00 00 00 88 00 00 00 00 00 00 00 ββββββββΓβββββββ
00000038 00 00 00 00 80 80 80 78 46 77 80 08 00 00 00 00 ββββΓΓΓxFwΓβ’ββββ
00000048 00 00 00 00 88 44 68 12 21 55 46 74 00 00 00 00 ββββΓDhβ’!UFtββββ
00000058 00 00 00 70 25 41 33 53 65 13 54 54 08 00 00 00 βββp%A3Seβ’TTβ’βββ
00000068 00 00 70 27 22 13 43 B7 9B 67 54 32 76 08 00 00 ββp'"β’CΓΓgT2vβ’ββ
00000078 00 00 26 22 76 76 98 BA AA BA 59 21 44 75 00 00 ββ&"vvΓΓΓΓY!Duββ
00000088 00 80 D2 71 99 AA 99 AA A9 AB 99 88 48 43 85 00 βΓΓqΓΓΓΓΓΓΓΓHCΓβ
00000098 00 60 12 A5 A9 9A 99 A9 AA 99 99 CA 48 55 07 00 β`β’ΓΓΓΓΓΓΓΓΓHUβ’β
000000a8 00 38 42 B9 AA 99 9A A9 99 99 89 88 77 78 88 00 β8BΓΓΓΓΓΓΓΓΓwxΓβ
000000b8 00 36 86 AA 99 99 B9 AA AA 99 78 78 77 46 75 00 β6ΓΓΓΓΓΓΓΓxxwFuβ
000000c8 80 67 66 A9 99 A9 AA BB BB AA 78 67 57 44 02 08 ΓgfΓΓΓΓΓΓΓxgWDβ’β’
000000d8 80 23 45 98 A9 AB CB BB BB AA 89 77 57 12 95 00 Γ#EΓΓΓΓΓΓΓΓwWβ’Γβ
000000e8 58 2E 55 98 99 BA BB CC BB AB 79 67 56 54 98 00 X.UΓΓΓΓΓΓΓygVTΓβ
000000f8 50 52 87 AA A9 BA BB BB CB BB 89 66 56 55 97 00 PRΓΓΓΓΓΓΓΓΓfVUΓβ
00000108 48 43 A5 AA BA BB CC CC CB 9A 88 66 55 34 84 00 HCΓΓΓΓΓΓΓΓΓfU4Γβ
00000118 70 44 A8 99 B9 CB CC CC AC 8A 56 45 55 33 05 08 pDΓΓΓΓΓΓΓΓVEU3β’β’
00000128 00 77 CB A9 AA BC CC CC BC 69 45 43 43 22 A5 08 βwΓΓΓΓΓΓΓiECC"Γβ’
00000138 80 67 A8 99 BA BB BC CC AB 58 44 33 32 43 A8 00 ΓgΓΓΓΓΓΓΓXD32CΓβ
00000148 00 34 74 A9 AA BB BB BB 7A 45 23 22 23 41 99 08 β4tΓΓΓΓΓzE#"#AΓβ’
00000158 80 46 74 99 99 AA BA AC 7A 34 22 12 23 41 87 80 ΓFtΓΓΓΓΓz4"β’#AΓΓ
00000168 00 17 52 99 89 AA AA BB 58 34 23 21 E2 4E A7 09 ββ’RΓΓΓΓΓX4#!ΓNΓβ£
00000178 00 36 73 99 99 98 98 A9 68 35 22 12 12 4E A9 00 β6sΓΓΓΓΓh5"β’β’NΓβ
00000188 70 44 88 87 99 88 78 88 66 45 32 21 E1 62 AA 07 pDΓΓΓΓxΓfE2!ΓbΓβ’
00000198 70 86 69 65 88 88 68 77 56 44 23 12 21 A7 0A 00 pΓieΓΓhwVD#β’!Γββ
000001a8 00 90 57 52 85 77 77 66 66 44 33 D1 42 99 00 00 βΓWRΓwwffD3ΓBΓββ
000001b8 00 00 70 56 41 55 65 67 54 35 12 21 63 09 00 00 ββpVAUegT5β’!cβ£ββ
000001c8 00 00 00 8A 44 32 22 22 1E 11 12 43 85 80 00 00 βββΓD2""β’β’β’CΓΓββ
000001d8 00 00 80 A0 57 55 12 EE 2F 22 32 54 85 08 00 00 ββΓΓWUβ’Γ/"2TΓβ’ββ
000001e8 00 00 00 80 99 57 33 45 75 57 66 78 A8 00 00 00 βββΓΓW3EuWfxΓβββ
000001f8 00 00 00 00 08 99 A9 0A 9A A0 A9 9A 08 00 00 00 βββββ’ΓΓβΓΓΓΓβ’βββ
00000208 00 00 00 00 00 90 80 00 80 00 87 80 00 00 00 00 βββββΓΓβΓβΓΓββββ
00000218 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ββββββββββββββββ
...
this final excerpt is from the bitmap data for the following image:

like all the other examples, it comes from the Nintendo DS game Fossil Fighters. specifically, the hole the player makes when digging for fossils:

because the bitmap uses 4-bit color indices, each digit of the hexdump encodes exactly one pixel of the image. i think the result mostly speaks for itself, but i'd specifically like to point out the highlight at the bottom right of the hole. in the plain hexdump, you might be able to pick out the general shape of the holeβespecially if you look at the character panel on the rightβbut with color, you can pick up an incredible amount of detail!
if youβve used a hex editor with color-coding before, you may have noticed something different about the way iβm choosing to color-code bytes
most colorful hex editors have a few categories they sort bytes into, like 00 bytes, printable ASCII, ASCII whitespace, other ASCII, non-ASCII, or FF bytes
hexyl, for example, uses the following categories by default:
β NULL bytes (0x00)
a ASCII printable characters (0x20 - 0x7E)
_ ASCII whitespace (0x09 - 0x0D, 0x20)
β’ ASCII control characters (except NULL and whitespace)
Γ Non-ASCII bytes (0x80 - 0xFF)
which end up looking something like this:
00 01 10 20 30 40 50 60 70 80 90 A0 B0 C0 D0 E0 F0 FF
full hexdump with hexyl colors
00000000 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ββ’β’β’β’β’β’β’β’__β’__β’β’
00000010 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’
00000020 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F !"#$%&'()*+,-./
00000030 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 0123456789:;<=>?
00000040 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F @ABCDEFGHIJKLMNO
00000050 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F PQRSTUVWXYZ[\]^_
00000060 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F `abcdefghijklmno
00000070 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F pqrstuvwxyz{|}~β’
00000080 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
00000090 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
000000a0 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
000000b0 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
000000c0 C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
000000d0 D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
000000e0 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
000000f0 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
these broad categories are enough to pick out common patterns like repeated null bytes and ASCII strings. they also create enough variation to track visually when scrolling, which i find quite helpful. it can be really disorienting to scroll around a fully monochrome hexdump
i, however, am going further, with 18 total groups: one for each leading nybble (0X, 1X, 2X...), plus two extras for 00 andFF:
00 01 10 20 30 40 50 60 70 80 90 A0 B0 C0 D0 E0 F0 FF
full hexdump with my colors
00000000 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ββ’β’β’β’β’β’β’β’βββ’β’ββ’β’
00000010 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’
00000020 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F !"#$%&'()*+,-./
00000030 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 0123456789:;<=>?
00000040 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F @ABCDEFGHIJKLMNO
00000050 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F PQRSTUVWXYZ[\]^_
00000060 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F `abcdefghijklmno
00000070 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F pqrstuvwxyz{|}~β’
00000080 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
00000090 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
000000a0 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
000000b0 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
000000c0 C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
000000d0 D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
000000e0 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
000000f0 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓβ³
having more colors makes it possible to recognize more complex patterns, like the ascending offsets from example 2 or the different sections in example 3. ASCII text is still recognizable, but instead of solid cyan, it's a variated green and orange:
my colors
00000000 6C 6F 6F 6B 20 6D 61 2C 20 69 27 6D 20 41 53 43 look ma, i'm ASC
00000010 49 49 21 20 6C 6F 72 65 6D 20 69 70 73 75 6D 20 II! lorem ipsum
00000020 61 6E 64 20 61 6C 6C 20 74 68 61 74 20 69 67 and all that ig
hexyl's colors
00000000 6C 6F 6F 6B 20 6D 61 2C 20 69 27 6D 20 41 53 43 look ma, i'm ASC
00000010 49 49 21 20 6C 6F 72 65 6D 20 69 70 73 75 6D 20 II! lorem ipsum
00000020 61 6E 64 20 61 6C 6C 20 74 68 61 74 20 69 67 and all that ig
non-ASCII UTF-8, on the other hand, looks completely different, with its own unique pattern that's only visible if you have a large number of color groups:
my colors
00000000 73 6F 6D 65 20 55 54 46 2D 38 3A 20 E3 81 93 E3 some UTF-8: ΓΓΓΓ
00000010 82 93 E3 81 AB E3 81 A1 E3 81 AF E3 80 81 E3 82 ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
00000020 A2 E3 83 AA E3 82 B9 E3 81 A7 E3 81 99 EF BC 81 ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
hexyl's colors
00000000 73 6F 6D 65 20 55 54 46 2D 38 3A 20 E3 81 93 E3 some UTF-8: ΓΓΓΓ
00000010 82 93 E3 81 AB E3 81 A1 E3 81 AF E3 80 81 E3 82 ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
00000020 A2 E3 83 AA E3 82 B9 E3 81 A7 E3 81 99 EF BC 81 ΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓΓ
there are a million more examples i could give, like negative numbers in two's complement (BD FF FF FF), machine code, encrypted data, color palettes, transformation matrices, and so on, but hopefully the ones i've given are enough to get my point across
colorful output in a hexdump is useful for the same reason that syntax highlighting for code is useful: it takes advantage of our brains' powerful visual pattern recognition. it lets us notice details in the data just as quickly as we notice details in the environment around us. color-coded bytes should be as prevalent in hex editors as syntax highlighting is in code editors today
there are lots of tools out there that use color, here are some that i know of:
hex viewers:
byte categories by default, gradient option
full rainbow byte coloring
uses colors to indicate sections for certain file types
xxd
option for byte categories, off2 by default
hex editors:
full rainbow byte coloring, and tons of other features
multiple color options (including custom), off by default
option for byte categories, off by default
if you know any other good ones, please let me know! if you work on any tools that show hexdumps, i highly recommend adding colors, ideally with a large number of groups (feel free to copy mine!). at the very least, making 00s more subtle than other bytes is extremely helpful
the main goal of this article is to spread awareness that this feature exists. it provides a lot of utility with practically no downside, and more people should be asking for it. if you'd like to submit a feature request for the tool you use most, i hope this article can serve as an explanation for why it's worth adding
while writing this article, i actually started making my own custom hex editor, called hexapoda >_<. it takes inspiration from Helix and Teehee (among others), with modal editing, multiple cursors, and selection-first operations (written in Rust, with Ratatui!). if enough people want, i might polish it up and write some docs so anyone can use it, but for now, it's just for me :3
xxd or hexyl that show hex but don't let you edit it βxxd's color output is set to "auto", which doesn't output any color for me, so i'm not sure what it's doing βentirely human-made,
please don't hesitate to report a mistake or suggest a fix!