Revert "Fix colorize mask for more than 16 colors"
This reverts commit 24595310b91034e13a9d3679f7f06eaa2b4782dc.
There is too much difference between master and 4.3 to make a cherry-pick work.