support direct color
remove unused code