It was good to find something that I didn't realise it existed in magento before today. Client had provided csv of products with only deepest child category. I needed to display product in that child category and it's parent categories above it.
We had custom module to display color boxes instead of color labels for colour selection. In the magento admin we had set label 'White' for admin / default but '#ffffff' for magento store frontend, so we can use it on style background color. See image for more details about this requirement and issue.