In DIRECT CODING we use 3bytes per pixel(as an accepted standard) with one byte for each primary color. Hence, each primary can have 256 different intesntiy level so we have a total of 256*256*256 poosible intensity level.
this is the true color representation. but the problem is a 1000*1000 true color image would take up 3 million bytes and also if each pixel in this image had a different color, there would only be 1 million colors so this representaion of 16.7 million diff colors is somewhat not practical.
Hence we have LOOKUP TABLE . in this the pixel values do not code colors directly instead the have the addresses or indices into a table of color values.
there is a table having 256 entries each of 24 bits color value(8 bits per primary). Pixel values are now 1 byte telling number from 0 to 255 in the table where a color value is stored.
so a 1000*1000 image now requires 1 million+768 bytes( for the color values in lookup table). hence it allows 256 simultaneous colors that are chosen from 16.7 million possible colors.

