separate colorgridboxdrawable code