test for displaying colour passed. refactored index layout to form a table