add color sampling and fore-back ground rendering