display_decode_color_device8(gx_device * dev, gx_color_index color,
                 gx_color_value prgb[4])
{
    gx_color_value one;
    /* palette of 96 colors */
    /* 0->63 = 00RRGGBB, 64->95 = 010YYYYY */
    if (color < 64) {
        one = (gx_color_value) (gx_max_color_value / 3);
        prgb[0] = (gx_color_value) (((color >> 4) & 3) * one);
        prgb[1] = (gx_color_value) (((color >> 2) & 3) * one);
        prgb[2] = (gx_color_value) (((color) & 3) * one);
        prgb[3] = 0;
    }
    else if (color < 96) {
        one = (gx_color_value) (gx_max_color_value / 31);
        prgb[0] = prgb[1] = prgb[2] = 0;
        prgb[3] = (gx_color_value) ((color & 0x1f) * one);
    }
    else {
        prgb[0] = prgb[1] = prgb[2] = prgb[3] = 0;
    }
    return 0;
}
display_decode_color_device8(gx_device * dev, gx_color_index color,
                 gx_color_value prgb[4])
{
    gx_color_value one;
     
     
    if (color < 64) {
        one = (gx_color_value) (gx_max_color_value / 3);
        prgb[0] = (gx_color_value) (((color >> 4) & 3) * one);
        prgb[1] = (gx_color_value) (((color >> 2) & 3) * one);
        prgb[2] = (gx_color_value) (((color) & 3) * one);
        prgb[3] = 0;
    }
    else if (color < 96) {
        one = (gx_color_value) (gx_max_color_value / 31);
        prgb[0] = prgb[1] = prgb[2] = 0;
        prgb[3] = (gx_color_value) ((color & 0x1f) * one);
    }
    else {
        prgb[0] = prgb[1] = prgb[2] = prgb[3] = 0;
    }
    return 0;
}