getColorForByte method
Returns the appropriate color for a specific byte value.
Uses the byte value to determine which color category it falls into:
- 0x00: nullByte
- 0x20-0x7E: printableAscii
- 0x01-0x1F: controlChar
- 0x80+: extendedAscii
Example:
final scheme = ByteColorScheme.standard();
final color = scheme.getColorForByte(0x41); // Returns printableAscii (for 'A')
Implementation
Color getColorForByte(int byte) {
if (byte == 0x00) return nullByte;
if (byte >= 0x20 && byte <= 0x7E) return printableAscii;
if (byte >= 0x01 && byte <= 0x1F) return controlChar;
return extendedAscii;
}