sharkdp / hexyl

A command-line hex viewer
Apache License 2.0
8.92k stars 227 forks source link

Is there a cheat sheet anywhere telling what color correlates to category of byte? #172

Closed MichaelBonnet closed 1 year ago

MichaelBonnet commented 1 year ago

Obviously the color highlighting is wonderful, but I'm not knowledgeable enough to know what color denotes what.

sharkdp commented 1 year ago

Good point. We should add a simple table to the README.

Until then, you can look at these parts:

https://github.com/sharkdp/hexyl/blob/9602667991a32ecc00c06b30a7ba16f8f448b677/src/lib.rs#L15-L20

https://github.com/sharkdp/hexyl/blob/9602667991a32ecc00c06b30a7ba16f8f448b677/src/lib.rs#L34-L58

And Rusts documentation for some of these methods, e.g. https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_graphic

joehillen commented 1 year ago

@sharkdp On a similar note. Is there a way to customize the colors? I suppose I could just tweak it in source.

sharkdp commented 1 year ago

@sharkdp On a similar note. Is there a way to customize the colors? I suppose I could just tweak it in source.

there is no way to do that right now.