     func setupDivider() {
         self.divider = UIView()
         self.divider.translatesAutoresizingMaskIntoConstraints = false
-        self.divider.backgroundColor = UIColor(white:0.8, alpha:1.0)
+        self.divider.backgroundColor = self.label.backgroundColor
         self.addSubview(self.divider)
         
         let views : [String:Any] = ["label" : self.label, "divider" : self.divider]

        self.label.textColor = UIColor(white:0.8, alpha:1.0)
        self.label.font = UIFont.boldSystemFont(ofSize:16)
        self.addSubview(self.label)

        let views : [String:Any] = ["label" : self.label]
        self.addConstraints(NSLayoutConstraint.constraints(withVisualFormat:"|-31-[label]", options:NSLayoutFormatOptions(rawValue:0), metrics:nil, views:views))
        self.addConstraints(NSLayoutConstraint.constraints(withVisualFormat:"V:|-16-[label]", options:NSLayoutFormatOptions(rawValue:0), metrics:nil, views:views))

        
        let numColors = delegate.numberOfColors(in:self)
        
        if self.buttons.count != 0 && self.buttons.count != numColors {
            fatalError("button count can not change")
        }
        
        if self.buttons.count == 0 {
            setupButtons(numButtons:numColors)
        }
        
        for index in 0..<numColors {
            let color = delegate.settingsPopover(self, colorAt:index)
            let button = self.buttons[index]
            button.backgroundColor = color
        }
    }
    
    func setupButtons(numButtons:Int) {
        
        for _ in 0..<numButtons {            
            let button = UIButton()
            button.translatesAutoresizingMaskIntoConstraints = false
            button.layer.cornerRadius = 8.0
            buttons.append(button)
            button.addTarget(self, action:#selector(SettingsPopover.colorButtonPressed(_:)), for:.touchUpInside)
            buttonPanel.addSubview(button)
        }
        
