This has historically proven contentious, but in my opinion (and as the spec is currently worded), you don't need to worry about either dithered colors or any direct colors other than ones beginning with 0x2. Color dithering was an extremely messy solution to a technical limitation which no longer exists. Nowadays, the dithered color range conflicts with LDConfig !COLOUR definitions, so if you support dithers, make sure to check for an LDConfig code first, as they have precedence.
Also, direct colors based on dither algorithms were never standard. They passed about by obscure tribal knowledge. I seem to have even missed 0x6 and 0x7, as my code doesn't even mention them.
If you really must support dithers, my C code to calculate RGB for dithered colorcodes is here, on Line 273. You even get bonus color commentary with the code.
Allen
Also, direct colors based on dither algorithms were never standard. They passed about by obscure tribal knowledge. I seem to have even missed 0x6 and 0x7, as my code doesn't even mention them.
If you really must support dithers, my C code to calculate RGB for dithered colorcodes is here, on Line 273. You even get bonus color commentary with the code.
Allen