Smallest image containing one of every RGB color
49683 bytes

Generated by this Python code:

import struct
import zlib

width = 2 ** 16
height = 2 ** 8
bit_depth = 8
color_type = 2
compression_method = 0
filter_method = 0
interlace_method = 0
scanlines = bytes(
    ([1] + (2 ** 8) * ([2, 1, 1] + (2 ** 8 - 1) * [1, 1, 1]))
    + (2 ** 8 - 1) * ([2] + 2 ** 16 * [2, 1, 2])
)

header = struct.pack(
    &quot;!IIBBBBB&quot;,
    width,
    height,
    bit_depth,
    color_type,
    compression_method,
    filter_method,
    interlace_method,
)
compress = zlib.compressobj(level=9, wbits=15, memLevel=9)
compressed = compress.compress(scanlines) + compress.flush()
png = b&quot;\x89PNG\r\n\x1a\n&quot;
for type, data in [(b&quot;IHDR&quot;, header), (b&quot;IDAT&quot;, compressed), (b&quot;IEND&quot;, b&quot;&quot;)]:
    crc = 0xFFFFFFFF
    for b in type + data:
        crc ^= b
        for k in range(8):
            crc = 0xEDB88320 * (crc &amp; 1) ^ crc &gt;&gt; 1
    crc ^= 0xFFFFFFFF
    png += struct.pack(&quot;!I4s&quot;, len(data), type) + data + struct.pack(&quot;!I&quot;, crc)

print(len(png))
with open(&quot;rgb.png&quot;, &quot;wb&quot;) as f:
    f.write(png)

Try it online!
(Note: many PNG readers accept an image missing the IEND chunk, but it is required by the PNG specification so I have included it.)