method to check if fore- or background color exists