refactor color loading