Add hasDarkbg fn and test