Use 32bits colors + batch paintings
Pre calculate colors to improve perf
Change for-in to Object.keys