add a function that can parse a background property of layout