Foreground/background colours

Added support for custom foreground (monochrome) and background colours.
Added code to select an appropriate shadow colour based on unbearable
lightness of background.