add init rgb optimization