         }
     }
     
+    @IBInspectable open var spacingColor: UIColor = UIColor.white {
+        didSet {
+            updateColors()
+        }
+    }
+    
     @IBInspectable open var avatarBorderWidth: CGFloat = 0.0 {
         didSet {
             updateBorders()

        addConstraint(trailingAnchor.constraint(equalTo: stackView.trailingAnchor))
    }
    
    func setUpBorderView(_ borderView: UIView) {
        borderView.clipsToBounds = true
        borderView.translatesAutoresizingMaskIntoConstraints = false
        borderView.backgroundColor = borderColor
        borderView.addConstraint(borderView.widthAnchor.constraint(equalTo: borderView.heightAnchor))
    }
    
    func setUpAvatarView(_ avatarView: AvatarView) {
        avatarView.translatesAutoresizingMaskIntoConstraints = false
        avatarView.addConstraint(avatarView.widthAnchor.constraint(equalTo: avatarView.heightAnchor))
        avatarView.borderColor = borderColor
        avatarView.innerColor = innerColor
        avatarView.textColor = textColor
        avatarView.borderWidth = avatarBorderWidth
        avatarView.fontName = fontName
        avatarView.fontSize = fontSize
    }
    
    func addAvatarView(_ avatarView: AvatarView, to borderView: UIView) {
        borderView.addSubview(avatarView)
        borderView.addConstraint(avatarView.leadingAnchor.constraint(equalTo: borderView.leadingAnchor))
        borderView.addConstraint(avatarView.topAnchor.constraint(equalTo: borderView.topAnchor))
        borderView.addConstraint(borderView.trailingAnchor.constraint(equalTo: avatarView.trailingAnchor))
        borderView.addConstraint(borderView.bottomAnchor.constraint(equalTo: avatarView.bottomAnchor))
    }
    
    func updateBorders() {

        avatarViews.forEach { avatarView in
            avatarView.borderColor = borderColor
            avatarView.textColor = textColor
            avatarView.spacingColor = spacingColor
        }
    }
    
    func updateMargins() {
        avatarViews.forEach { $0.outerMargin = spacing }
    }
    
}
