It depends on the pixelformat of your bitmap.
If your bitmap is pf24bit, the Scanline property of TBitmap points to
memory that contains each time 3 bytes with a color value.
If your bitmap is pf8bit, the value is just an index into the bitmap's color
palette, one byte per color. Obviously, since a byte can only hold 256
different values, there can only be a max of 256 different colors in the
bitmap (or 256 greyscales).
There are also some other pixelformats, but they aren't used that often
anymore. One exception is pf32bit, for that format there's a very good
library called "Graphics32".
Try to check out EFG's graphics and bitmap pages for more information and
Hope that helps,