A Grayscale-Compatible Color Encoding via 8-bit HSV Bit-Packing and Lightweight Refinement

In one sentenceStores a colour image as one 16-bit channel whose high byte is exactly the standard grayscale and whose low byte holds a 4+4-bit hue/saturation hint; a 0.47 M-parameter U-Net restores the colour.
The problem
Converting a colour image to grayscale makes it compact and keeps it compatible with grayscale pipelines, but it throws away all chrominance. Colourization networks try to bring the colour back from the gray image alone. They are typically large, and because the input carries no explicit colour anchor, the colours they produce come from learned priors and can be wrong for the scene.
Invertible-grayscale methods instead hide colour inside an 8-bit gray-like image, either by modifying pixel values (reversible data hiding) or with learned invertible networks. The image they produce looks like a grayscale picture but is not guaranteed to be bit-identical to the standard grayscale, and the neural variants usually require heavier encoder–decoder networks. This paper takes a different design point: a 16-bit single-channel carrier whose high byte is the standard BT.601 grayscale, with the second byte spent on an explicit colour hint. It is intentionally not a replacement for strict 8-bit storage: it uses 16 instead of 8 bits per pixel, still down from 24 for RGB.
How it works
The encoder is a fixed bit-packing rule with no learned parameters. The decoder first rebuilds a coarse colour image deterministically from the packed bits, then a small U-Net refines it.

- Gray in the high byte. For each pixel, the standard ITU-R BT.601 grayscale value (0.299 R + 0.587 G + 0.114 B, rounded to 8 bits) is stored in the 8 most significant bits of a 16-bit word.
- Quantize hue and saturation. The pixel’s hue (OpenCV range 0–179) and saturation (0–255) are each quantized to 4 bits. This balanced split, H4S4, was chosen by the bit-allocation ablation.
- Pack the low byte. The 4-bit hue and 4-bit saturation are packed into the low byte (8 bits in all), the HSV hint. Shifting the word right by 8 bits returns the standard grayscale exactly: gray PSNR is infinite and gray SSIM is 1.0.
- Direct decoder. Without any training, the word is unpacked, hue and saturation are dequantized, the gray value is used as V, and HSV is converted back to RGB. This gives a coarse colour image.
- Residual refinement. The main model (UNet-residual) is a two-level U-Net with 0.47 M parameters. It takes the coarse RGB together with the gray, hue and saturation planes (6 channels) and adds a residual scaled by 0.25; the result is clipped to the valid range. Two direct-prediction variants of the same size serve as ablations: UNet-gray sees only the gray plane, and UNet-hints sees gray, hue and saturation (3 channels).

Results
All networks are trained on the 5,000-image PASCAL VOC 2012 subset (80/20 train/val) and tested at 256 × 256 on Kodak 24, the DIV2K validation set (100 images) and McMaster 18. The low-byte hint carries most of the colour: the U-Net that sees gray, hue and saturation (UNet-hints) reaches 40.64 dB on Kodak 24, 38.10 dB on DIV2K and 35.41 dB on McMaster, while the same network given only the gray plane reaches 23.89, 22.98 and 18.61 dB. The direct decoder alone, with no network, gives 26.05 dB on Kodak 24. The residual variant reaches 37.88, 37.60 and 31.26 dB; the authors attribute its gap on the saturated McMaster images to the residual scale of 0.25, which limits how far it can correct a weak direct reconstruction. Among the re-measured baselines, WIN 2025 scores higher on most metrics (40.96 dB on Kodak 24, 38.16 dB on DIV2K and 39.43 dB on McMaster). The authors stress that these comparisons are not rate-normalized, since the baselines use an 8-bit carrier and this method a 16-bit one.
The format is fragile under lossy processing of the 16-bit image. JPEG at quality 90 lowers Kodak PSNR of the residual pipeline from 37.88 dB to 22.02 dB, and a Gaussian blur of σ = 0.5 to 16.32 dB, because both mix or discard the bits of the hint byte. If the hint byte is dropped entirely, the output falls back to a near-grayscale image (22.79 dB, SSIM 0.931). The authors therefore recommend the format for pipelines that keep the 16-bit image lossless, for example 16-bit PNG.


Cite
@article{pan2026grayscale,
title={A Grayscale-Compatible Color Encoding via 8-bit HSV Bit-Packing and Lightweight Refinement},
author={Pan, Wei and Feng, Kai and Lefevre, Pascal},
journal={Available at SSRN 7273824},
year={2026}
}