Skip to content

Change how 15-bit GB colors are reported by RGBGFX #1889

@Rangi42

Description

@Rangi42

This is mainly an issue for verbose debugging output, but also relevant to some error messages.

RGBGFX's input PNG images have 24-bit colors (8-bit channels), and get reported as the usual #RRGGBB syntax. This is fine.

However, after the colors have been quantized to GB's 15-bit (5-bit channels), they get reported as encoded $xxxx hex values. This obscures the 0-31 (0x00-0x1F) values of the individual red/green/blue channels, and makes it very hard to relate the processing steps to the visible image pixels.

(Note that it would not be appropriate to report 5-bit channels by scaling them back up to 8-bit -- there's no guarantee that the filled-in lower three bits would exactly match what's in the input image, especially if the input image had two slightly different 8-bit colors that got fused/reduced into the same 5-bit color.)

Even binary would be more appropriate here -- %0_bbbbb_ggggg_rrrrr. But more seriously, some ideas for how to report GB colors, using #005AB5 (GB $5960, i.e. R=0, G=11, B=22) as an example:

  • GB(00,11,22)
  • GB00.11.22
  • r00g11b22
  • $00.0b.16
  • $00/0b/16
  • basically anything that shows the per-channel values (I'd somewhat prefer them in 0-31 decimal to 00-1F hex, and I like having some kind of prefix to indicate "here comes a GB color")

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementTypically new features; lesser priority than bugsrgbgfxThis affects RGBGFX

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions