title: How to change html list bullet point color for a link item in swift?
body: <p>I have <code>UITextView</code> and for it I use an HTML string that contains a list of two elements, one of which is a link. I don't want the link text to be the default blue color so I changed it to orange with <code>.linkTextAttributes</code>. But how to set a different color for the list bullet? It is still blue</p>
  <pre><code>class ViewController: UIViewController {
  
      var textView = UITextView()
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          let htmlString = &quot;&quot;&quot;
          &lt;p&gt;My list&lt;/p&gt;
          &lt;ul&gt;
              &lt;li&gt;&lt;a&gt;Item&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href=\&quot;https://www.apple.com&quot;&gt;Link item&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &quot;&quot;&quot;
  
          textView.linkTextAttributes = [ .foregroundColor: UIColor.orange ]
  
          let modifiedFont = String(format:&quot;&lt;span style=\&quot;font-family: \(String(describing: UIFont.italicSystemFont)); font-size: \(45)\&quot;&gt;%@&lt;/span&gt;&quot;, htmlString)
  
          guard let htmlData = modifiedFont.data(using: String.Encoding.utf8, allowLossyConversion: false) else {
              return
          }
  
          let attributedString = try! NSAttributedString(data: htmlData,
                                                            options: [NSAttributedString.DocumentReadingOptionKey.documentType: NSAttributedString.DocumentType.html,
                                                                      NSAttributedString.DocumentReadingOptionKey.characterEncoding: String.Encoding.utf8.rawValue],
                                                            documentAttributes: nil)
  
          self.textView.attributedText = attributedString
      }
  
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/62dN8l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/62dN8l.png" alt="" /></a></p>