             
             let badgePath = UIBezierPath(rect: badgeRect)
             badgePath.lineWidth = lineWidth
-            titleLabel.textColor.set()
+            titleLabel.textColor.withAlphaComponent(titleLabel.alpha).set()
             badgePath.stroke()
         }
     }

            var countStringAttributes: [String: Any] = [:]
            countStringAttributes[NSFontAttributeName] = countFont
            if let textColor = titleLabel.textColor {
                countStringAttributes[NSForegroundColorAttributeName] = textColor
            } else {
                countStringAttributes[NSForegroundColorAttributeName] = UIColor.clear
            }

            let inset = (badgeSize.width + margin) / 2
            titleEdgeInsets = UIEdgeInsetsMake(0, -inset, 0, inset)
            
            let countPoint = CGPoint(x: titleLabel.frame.maxX + margin + countEdgeInsets.left - inset + titleEdgeInsets.right,
                                     y: titleLabel.frame.midY - (countString.size().height / 2))
            
            countString.draw(at: countPoint)
