add a function that can parse backgound property of layout