有标准的 8 位调色板吗?
我正在尝试从日志记录程序对文件格式进行逆向工程。它似乎使用了一个 1-2 字节的字段,可用于标签颜色,因为它似乎是唯一无法解释的事情。如果没有迭代其他标签颜色并生成新的输出文件(这是一件很痛苦的事情,因此我首先尝试对格式进行逆向工程),是否有任何标准的 8 位调色板可以与它们对齐?我发现了一些(例如网络上允许的唯一 216 种颜色),但它们没有以任何特定方式枚举。
我相信 0x32
是浅绿色(例如 0,255,0),0x0A
是 青色 青色(0, 255, 255),0x28
为红色。每个字段还可能包含尾随 0x00
。
或者我可能完全错了。
I'm attempting to reverse engineer a file format from a logging program. It seems to use a 1-2 byte field which may be used for label colors, as it seems to be the only thing that's unexplained. Short of iterating through other label colors and generating new output files (which is a pain in the ass, hence me trying to reverse-engineer the format in the first place), are there any standard 8-bit color palettes they may line up with? I've found some (e.g. the only 216 colors that are allowed on the web), but they're not enumerated in any particular way.
I believe 0x32
is light green (e.g. 0,255,0), 0x0A
is teal cyan (0, 255, 255), and 0x28
is red. Each field may also include a trailing 0x00
.
Or I could be totally wrong.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗯,它可能是旧的标准 VGA 调色板之一。这是模式 13h 的:
但是,您发布的数字似乎相差一号从索引变为通常的排序。
编辑:以下是 python 格式数组中颜色分量的 24 位 RGB 值。有点长,请注意!
Well, it could be one of the old standard VGA palettes. This is the one for mode 13h:
However, the numbers you posted seem to be off-by-one from the index into the usual ordering.
EDIT: Here are the 24-bit RGB values for the color components in a python formatted array. It is a bit long so be warned!
8 位没有标准调色板但是图文电视使用真正的 8 位调色板
它基于硬件
http://en.wikipedia.org/wiki/List_of_8-bit_computer_hardware_palettes
编辑:某些设备能够通过调整亮度来显示不同深浅的颜色,但真正的 8 位是这个调色板 ( Teletext )
There is no standard palette for 8-bit but Teletext uses true 8-bit color palette
It's based on hardwares
http://en.wikipedia.org/wiki/List_of_8-bit_computer_hardware_palettes
Edit : Some devices able to show different shades of color by adjusting brightness but true 8-bit is this palette ( Teletext )