RBT example: factorize the color bit