Color coding with word processor like toolbar for structures like MBRs

Wishlists for new functionality and features.
Post Reply
Maël
Site Admin
Posts: 1454
Joined: 12 Mar 2005 14:15

Color coding with word processor like toolbar for structures like MBRs

Post by Maël »

There have been various feature requests along the same lines. But it's always good to have a specific goal/example to limit the scope and make it easier to imagine the ideal user interaction.

https://thestarman.pcministry.com/asm/mbr/W8VBR.htm
starman-W8VBR.png
starman-W8VBR.png (62 KiB) Viewed 8894 times
This feature should allow to produce a similar output as given in the link above, with a similar workflow in mind (debugging, reverse engineering, iterative work). Stream portions should be selectable, then assigned a name, a type and a color in a toolbar. Color selection or highlighting should be automatic for ideal selection of contrast and distinguishability while reducing the count of colors used (which is a frequent issue with many statistical representations).

https://en.wikipedia.org/wiki/Four_color_theorem is related, as is coloring of maps with a limited set of colors. The colors in the examples are not well chosen though, since they do not consider color visions variations (most real maps do).

Maybe selecting from a list of default color palettes/formatting styles, derived from the logical annotations (=named and typed stream sections) would be useful as well, to quickly try out various styles. They should however be distinguishable for all by default (for some reason a lot of recent designs forget this and favor "style" instead of UX, and add a half-backed feature in later).

This formatted (and colorful) view should be exportable as RTF and HTML to create documentations of file formats, reverse engineering or debugging efforts.

The "named and typed bookmarks" created this way should be listed in a hierarchical (treeview? or hierarchical list view) or table view, so they can be edited or deleted or moved to other offsets.


This can be the basis for a data structure definition, that can then be overlayed on other streams later. But the main focus is formatting and structuring a specific file. Generalizing to a full structure viewer is another feature request.
Maël
Site Admin
Posts: 1454
Joined: 12 Mar 2005 14:15

Re: Color coding with word processor like toolbar for structures like MBRs

Post by Maël »

Good example of color coding: https://en.wikipedia.org/w/index.php?ti ... S_byte_map
Not because all colors are dissimilar enough, but because they are used in large contiguous patches, which makes it easier to distinguish, and more organized.

Here is another example, with better contrast: https://de.wikipedia.org/w/index.php?ti ... Gliederung

(Links are archived versions/timestamped versions to ensure the colors are still the same as when I linked them.)

Great colors as well (first image looks a bit fuzzy/color mixed, right click to view it alone for clearest colors):
sehr gute farben.png
sehr gute farben.png (8.54 KiB) Viewed 8704 times
sehr gute farben xtlBD.png
sehr gute farben xtlBD.png (25.73 KiB) Viewed 8704 times
Nice background colors:
1024px-Simple_Periodic_Table_Chart-en.svg[1].png
1024px-Simple_Periodic_Table_Chart-en.svg[1].png (151.2 KiB) Viewed 8282 times
Other good background colors can be found in the URH manual: https://github.com/jopohl/urh/releases/ ... rguide.pdf
Maël
Site Admin
Posts: 1454
Joined: 12 Mar 2005 14:15

Re: Color coding with word processor like toolbar for structures like MBRs

Post by Maël »

j7n wrote: 16 Feb 2019 05:32I noticed that the new Data Inspector already has WideChar decoding, I'd like to see that as one of the choices for the text column, to read more than one symbol at a time.
Maybe other fixed width fields from the Inspector could be candidates for a tabular display in a column, with a spin control to set alignment.
I thought of something similar. I think however that this probably makes most sense as part of a structure view, since you need a defined start offset, or the view will change randomly all the time, especially when moving the caret (which defines the start offset for the datainspector). It would result in quite a chaotic display while selecting, as the content that is selected would change continuously.
Scrolling would also be dependent on caret position, which is unexpected as well.

The offset that is set using the spin edit, also fits more into a structure view idea, that is pinned in place (until moved explicitly with the spin edit, but not within the hex editor, using the caret).

Possibly a separate window similar to the data inspector would work, which lists arrays of a certain type. Maybe as option to expand the current data type in the data inspector to an array (such as automatically selecting the array element type depending on the selected data inspector row), or another tab that shows arrays, instead of single data types.

More relevant comments about structure views are in this post, specifically (not the entire thread, though some other overall ideas might be relevant):
https://forum.mh-nexus.de/viewtopic.php?p=3070#p3070
Fred
Posts: 3
Joined: 18 Jun 2019 13:35

Re: Color coding with word processor like toolbar for structures like MBRs

Post by Fred »

I agree being able to tag a section of data with a color and notes is a nice idea! I was about to write down bookmarks and notes in a .txt document, but that would be a bit cumbersome, haha.
Color selection or highlighting should be automatic
I suppose I'm fine with that, but when just thinking about how i'd wanna go about marking my reverse engineering file, I'd probably want to mark functions with one color and data with another. If it's automatic, i could put what it is in the notes though.

Great program btw!
Maël
Site Admin
Posts: 1454
Joined: 12 Mar 2005 14:15

Re: Color coding with word processor like toolbar for structures like MBRs

Post by Maël »

Thanks.

If you have any special procedure you follow, posting an example picture and maybe notes could help for the design in future. Especially, the code vs. data separation.

Or if you have a video that shows the procedure it would be even better (so I can see the interaction), but that's a lot of work, so pictures and some text would be fine.
Fred
Posts: 3
Joined: 18 Jun 2019 13:35

Re: Color coding with word processor like toolbar for structures like MBRs

Post by Fred »

Well, I have seen coloring tools in other programs but never actually used them. So this would be the first time for me haha.
I think I would mark code blocks in 2 alternating shades of the same color. Same for data, one array starts here, followed by other unrelated data etc.
I like the idea of being able to identify what the hex represents just by looking at the color.

Image
I also marked the padding FFs in another color.

Like I said, I've never used this kind of function before so I don't know how others would do it. I'd be happy with any kind of color/note marking, automatic or not! Haha.
Fred
Posts: 3
Joined: 18 Jun 2019 13:35

Re: Color coding with word processor like toolbar for structures like MBRs

Post by Fred »

Alright, went and tried wxHexEditor which has a color/note system it calls TAG -

Image

Tried it just briefly, but let's see...

When tagging, I wanted it to be quick. wxHexEditor had a shortcut for marking which was nice. I actually didn't want to set a color, just mark something and move on (well, maybe add a comment too).

Pictured here is me having tagged a few sections and using the default colors. Yeah... haha!

Maybe I'd color code code/data differently if it's fast and intuitive to do, but it wasn't as interesting as I thought at first. Quickly marking sections and applying a well thought-out default color scheme sounds fine to me.
Post Reply