Expression painter.depth returns the color depth of the target surface for drawings. A depth of 1 indicates a bitonal surface. A depth of 24 or 32 indicates a true color surface.
painter.depth
1
24
32