{"id":52,"date":"2024-04-09T05:18:06","date_gmt":"2024-04-09T05:18:06","guid":{"rendered":"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/"},"modified":"2024-04-09T05:18:06","modified_gmt":"2024-04-09T05:18:06","slug":"hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design","status":"publish","type":"post","link":"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/","title":{"rendered":"Hex Color Converter Convert HEX Strings to UIColor and Color in iOS Design"},"content":{"rendered":"<div class=\"toc\">\n<h2>Table of Contents<\/h2>\n<ul>\n<li><a href=\"#Converting-HEX-Strings-to-UIColor-in-UIKit\">Converting HEX Strings to UIColor in UIKit<\/a><\/li>\n<li><a href=\"#Converting-HEX-Strings-to-Color-in-SwiftUI\">Converting HEX Strings to Color in SwiftUI<\/a><\/li>\n<li><a href=\"#Additional-Features-Easy-Extension-Methods-with-DittoSwift\">Additional Features: Easy Extension Methods with DittoSwift<\/a><\/li>\n<li><a href=\"#Conclusion\">Conclusion<\/a><\/li>\n<\/ul>\n<\/div>\n<p>Color plays a crucial role in iOS design, as it has the power to evoke different emotions and impressions. The choice of color can make a design feel warm and inviting or cold and sterile. It can also convey a sense of modernity or outdatedness to the design. One critical aspect of color is transferring it to and from your iOS application with other applications and services. Currently, most applications transfer color using RGBA HEX strings. However, iOS does not have a built-in way to convert HEX strings to UIColor or SwiftUI&#8217;s Color types.<\/p>\n<p>In this article, we will learn how to convert HEX strings to UIColor and Color for both UIKit and SwiftUI in iOS.<\/p>\n<h2 id=\"Converting-HEX-Strings-to-UIColor-in-UIKit\">Converting HEX Strings to UIColor in UIKit<\/h2>\n<p>To convert HEX strings to UIColor in UIKit, follow these steps:<\/p>\n<ol>\n<li>Create a new Xcode project.<\/li>\n<li>Create a file called &#8220;UIColor+Hex.swift&#8221; and add the following code:<\/li>\n<\/ol>\n<p>&#8220;`swift<br \/>\nextension UIColor {<br \/>\n    convenience init?(hex: String) {<br \/>\n        var hexString = hex.trimmingCharacters(in: .whitespacesAndNewlines).uppercased()<br \/>\n        if hexString.hasPrefix(&#8220;#&#8221;) {<br \/>\n            hexString.removeFirst()<br \/>\n        }<\/p>\n<pre><code>    let scanner = Scanner(string: hexString)\n    var rgbValue: UInt64 = 0\n    guard scanner.scanHexInt64(&amp;rgbValue) else { return nil }\n\n    var red, green, blue, alpha: UInt64\n    switch hexString.count {\n    case 6:\n        red = (rgbValue &gt;&gt; 16)\n        green = (rgbValue &gt;&gt; 8) &amp; 0xFF\n        blue = (rgbValue) &amp; 0xFF\n        alpha = 255\n    case 8:\n        red = (rgbValue &gt;&gt; 16)\n        green = (rgbValue &gt;&gt; 8) &amp; 0xFF\n        blue = (rgbValue) &amp; 0xFF\n        alpha = rgbValue &gt;&gt; 24\n    default:\n        return nil\n    }\n\n    self.init(red: CGFloat(red) \/ 255, green: CGFloat(green) \/ 255, blue: CGFloat(blue) \/ 255, alpha: CGFloat(alpha) \/ 255)\n}\n\nfunc toHexString(includeAlpha: Bool = false) -&gt; String? {\n    guard let components = self.cgColor.components else { return nil }\n\n    let red = Int(components[0] * 255.0)\n    let green = Int(components[1] * 255.0)\n    let blue = Int(components[2] * 255.0)\n\n    let hexString: String\n    if includeAlpha, let alpha = components.last {\n        let alphaValue = Int(alpha * 255.0)\n        hexString = String(format: \"#%02X%02X%02X%02X\", red, green, blue, alphaValue)\n    } else {\n        hexString = String(format: \"#%02X%02X%02X\", red, green, blue)\n    }\n\n    return hexString\n}\n<\/code><\/pre>\n<p>}<br \/>\n&#8220;`<\/p>\n<ol>\n<li>You can now use the UIColor extension to convert HEX strings to UIColor. For example:<\/li>\n<\/ol>\n<p><code>swift<br \/>\nlet hexString = \"FF0000\"<br \/>\nlet uiColor: UIColor? = UIColor(hex: hexString)<\/code><\/p>\n<p>This code snippet will convert the HEX string &#8220;FF0000&#8221; to a UIColor object.<\/p>\n<ol>\n<li>You can also convert a UIColor object back to a HEX string using the <code>toHexString<\/code> method. For example:<\/li>\n<\/ol>\n<p><code>swift<br \/>\nlet hexString: String? = uiColor?.toHexString()<\/code><\/p>\n<p>This code snippet will convert the UIColor object back to the HEX string representation.<\/p>\n<h2 id=\"Converting-HEX-Strings-to-Color-in-SwiftUI\">Converting HEX Strings to Color in SwiftUI<\/h2>\n<p>If you are working with SwiftUI, you can convert HEX strings to Color using the following steps:<\/p>\n<ol>\n<li>Create a file called &#8220;Color+Hex.swift&#8221; in your SwiftUI project and add the following code:<\/li>\n<\/ol>\n<p>&#8220;`swift<br \/>\nimport SwiftUI<\/p>\n<p>extension Color {<br \/>\n    init?(hex: String) {<br \/>\n        guard let uiColor = UIColor(hex: hex) else { return nil }<br \/>\n        self.init(uiColor: uiColor)<br \/>\n    }<\/p>\n<pre><code>func toHexString(includeAlpha: Bool = false) -&gt; String? {\n    return UIColor(self).toHexString(includeAlpha: includeAlpha)\n}\n<\/code><\/pre>\n<p>}<br \/>\n&#8220;`<\/p>\n<ol>\n<li>You can now use the Color extension to convert HEX strings to Color. For example:<\/li>\n<\/ol>\n<p><code>swift<br \/>\nlet hexString = \"FF0000\"<br \/>\nlet color: Color? = Color(hex: hexString)<\/code><\/p>\n<p>This code snippet will convert the HEX string &#8220;FF0000&#8221; to a Color object in SwiftUI.<\/p>\n<ol>\n<li>You can also convert a Color object back to a HEX string using the <code>toHexString<\/code> method. For example:<\/li>\n<\/ol>\n<p><code>swift<br \/>\nlet hexString: String? = color?.toHexString()<\/code><\/p>\n<p>This code snippet will convert the Color object back to the HEX string representation.<\/p>\n<h2 id=\"Additional-Features-Easy-Extension-Methods-with-DittoSwift\">Additional Features: Easy Extension Methods with DittoSwift<\/h2>\n<p>If you&#8217;re using DittoSwift in your project, you can take advantage of the following extension methods for UIColor and Color conversion:<\/p>\n<ol>\n<li>Create a file called &#8220;Ditto+ColorExtensions.swift&#8221; and add the following code:<\/li>\n<\/ol>\n<p>&#8220;`swift<br \/>\nimport SwiftUI<br \/>\nimport DittoSwift<\/p>\n<p>extension DittoDocumentPath {<br \/>\n    func uiColorFromHexString() -&gt; UIColor? {<br \/>\n        guard let string = self.string else { return nil }<br \/>\n        return UIColor(hex: string)<br \/>\n    }<\/p>\n<pre><code>func colorFromHexString() -&gt; Color? {\n    guard let string = self.string else { return nil }\n    return Color(hex: string)\n}\n<\/code><\/pre>\n<p>}<\/p>\n<p>extension DittoMutableDocumentPath {<br \/>\n    func set(color: Color, includeAlpha: Bool = false, isDefault: Bool = false) {<br \/>\n        self.set(color.toHexString(includeAlpha: includeAlpha))<br \/>\n    }<\/p>\n<pre><code>func set(uiColor: UIColor, includeAlpha: Bool = false, isDefault: Bool = false) {\n    self.set(uiColor.toHexString(includeAlpha: includeAlpha))\n}\n\nfunc uiColorFromHexString() -&gt; UIColor? {\n    guard let string = self.string else { return nil }\n    return UIColor(hex: string)\n}\n\nfunc colorFromHexString() -&gt; Color? {\n    guard let string = self.string else { return nil }\n    return Color(hex: string)\n}\n<\/code><\/pre>\n<p>}<br \/>\n&#8220;`<\/p>\n<ol>\n<li>Now, you can parse the <code>DittoDocumentPath<\/code> and <code>DittoMutableDocumentPath<\/code> objects to convert HEX strings to UIColor and Color, respectively. For example:<\/li>\n<\/ol>\n<p>&#8220;`swift<br \/>\nlet docs = ditto.store[&#8220;cars&#8221;].find(&#8220;make == $args.make&#8221;, args: [&#8220;make&#8221;: &#8220;Honda&#8221;]).exec()<\/p>\n<p>docs.forEach { doc in<br \/>\n    let uiColor: UIColor? = doc[&#8220;color&#8221;].uiColorFromHexString()<br \/>\n    let color: Color? = doc[&#8220;color&#8221;].colorFromHexString()<br \/>\n}<br \/>\n&#8220;`<\/p>\n<p>In this code snippet, we are retrieving documents from the &#8220;cars&#8221; collection and converting the &#8220;color&#8221; field from HEX strings to UIColor and Color objects.<\/p>\n<ol>\n<li>You can also mutate the <code>DittoMutableDocumentPath<\/code> with UIColor and Color extensions. For example:<\/li>\n<\/ol>\n<p><code>swift<br \/>\nditto.store[\"cars\"].find(\"make == $args.make\", args: [\"make\": \"Honda\"])<br \/>\n    .update { mutableDoc in<br \/>\n        mutableDoc[\"color\"].set(Color.red)<br \/>\n    }<\/code><\/p>\n<p>This code snippet updates the &#8220;color&#8221; field of the documents with the UIColor object representing the color red.<\/p>\n<h2 id=\"Conclusion\">Conclusion<\/h2>\n<p>Color is a vital part of any iOS app, and being able to convert between HEX strings and UIColor\/Color is essential, especially when transmitting color through a network. By using the provided extensions, you can easily convert HEX strings to UIColor and Color in both UIKit and SwiftUI. Additionally, if you&#8217;re using DittoSwift, you can take advantage of the extension methods to simplify the conversion process. We hope this tutorial helps you in your next iOS project, whether you&#8217;re using Ditto or not!<\/p>\n<hr \/>\n<p>In summary, this article discussed the importance of color in iOS design and the need to convert HEX strings to UIColor and Color in UIKit and SwiftUI. It provided step-by-step instructions and code snippets for converting HEX strings to UIColor and Color. It also introduced additional features using DittoSwift for easier conversion and mutation of UIColor and Color objects. By following these guidelines, you can seamlessly integrate color conversion into your iOS applications.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hex color converter: Easily convert HEX strings to UIColor and color in iOS design. Perfect tool for developers and designers.<\/p>\n","protected":false},"author":1,"featured_media":53,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[18],"class_list":["post-52","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-design","tag-hex-color-converter-uicolor-ios-design"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.3 (Yoast SEO v23.4) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Hex Color Converter Convert HEX Strings to UIColor and Color in iOS Design<\/title>\n<meta name=\"description\" content=\"Hex color converter: Easily convert HEX strings to UIColor and color in iOS design. Perfect tool for developers and designers.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hex Color Converter Convert HEX Strings to UIColor and Color in iOS Design\" \/>\n<meta property=\"og:description\" content=\"Hex color converter: Easily convert HEX strings to UIColor and color in iOS design. Perfect tool for developers and designers.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/\" \/>\n<meta property=\"og:site_name\" content=\"Anon Tools Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-09T05:18:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/anon.tools\/public\/blog\/wp-content\/uploads\/2024\/04\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design-1712634365.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"942\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"wp_An0nBLoG\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"wp_An0nBLoG\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/\"},\"author\":{\"name\":\"wp_An0nBLoG\",\"@id\":\"https:\/\/anon.tools\/public\/blog\/#\/schema\/person\/c08bec5f31609e1ba68526ed2797c2a5\"},\"headline\":\"Hex Color Converter Convert HEX Strings to UIColor and Color in iOS Design\",\"datePublished\":\"2024-04-09T05:18:06+00:00\",\"dateModified\":\"2024-04-09T05:18:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/\"},\"wordCount\":736,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/anon.tools\/public\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/anon.tools\/public\/blog\/wp-content\/uploads\/2024\/04\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design-1712634365.webp\",\"keywords\":[\"Hex color converter UIColor iOS design\"],\"articleSection\":[\"Design\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/\",\"url\":\"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/\",\"name\":\"Hex Color Converter Convert HEX Strings to UIColor and Color in iOS Design\",\"isPartOf\":{\"@id\":\"https:\/\/anon.tools\/public\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/anon.tools\/public\/blog\/wp-content\/uploads\/2024\/04\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design-1712634365.webp\",\"datePublished\":\"2024-04-09T05:18:06+00:00\",\"dateModified\":\"2024-04-09T05:18:06+00:00\",\"description\":\"Hex color converter: Easily convert HEX strings to UIColor and color in iOS design. Perfect tool for developers and designers.\",\"breadcrumb\":{\"@id\":\"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#primaryimage\",\"url\":\"https:\/\/anon.tools\/public\/blog\/wp-content\/uploads\/2024\/04\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design-1712634365.webp\",\"contentUrl\":\"https:\/\/anon.tools\/public\/blog\/wp-content\/uploads\/2024\/04\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design-1712634365.webp\",\"width\":942,\"height\":628,\"caption\":\"hex color converter\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/anon.tools\/public\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hex Color Converter Convert HEX Strings to UIColor and Color in iOS Design\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/anon.tools\/public\/blog\/#website\",\"url\":\"https:\/\/anon.tools\/public\/blog\/\",\"name\":\"Anon Tools Blog\",\"description\":\"Digital Tools, Guarded Secrets\",\"publisher\":{\"@id\":\"https:\/\/anon.tools\/public\/blog\/#organization\"},\"alternateName\":\"AnonTools Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/anon.tools\/public\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/anon.tools\/public\/blog\/#organization\",\"name\":\"Anon Tools Blog\",\"url\":\"https:\/\/anon.tools\/public\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/anon.tools\/public\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/anon.tools\/public\/blog\/wp-content\/uploads\/2024\/04\/cropped-anon.png\",\"contentUrl\":\"https:\/\/anon.tools\/public\/blog\/wp-content\/uploads\/2024\/04\/cropped-anon.png\",\"width\":512,\"height\":512,\"caption\":\"Anon Tools Blog\"},\"image\":{\"@id\":\"https:\/\/anon.tools\/public\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/anon.tools\/public\/blog\/#\/schema\/person\/c08bec5f31609e1ba68526ed2797c2a5\",\"name\":\"wp_An0nBLoG\",\"sameAs\":[\"https:\/\/anon.tools\/public\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Hex Color Converter Convert HEX Strings to UIColor and Color in iOS Design","description":"Hex color converter: Easily convert HEX strings to UIColor and color in iOS design. Perfect tool for developers and designers.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/","og_locale":"en_US","og_type":"article","og_title":"Hex Color Converter Convert HEX Strings to UIColor and Color in iOS Design","og_description":"Hex color converter: Easily convert HEX strings to UIColor and color in iOS design. Perfect tool for developers and designers.","og_url":"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/","og_site_name":"Anon Tools Blog","article_published_time":"2024-04-09T05:18:06+00:00","og_image":[{"width":942,"height":628,"url":"https:\/\/anon.tools\/public\/blog\/wp-content\/uploads\/2024\/04\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design-1712634365.webp","type":"image\/webp"}],"author":"wp_An0nBLoG","twitter_card":"summary_large_image","twitter_misc":{"Written by":"wp_An0nBLoG","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#article","isPartOf":{"@id":"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/"},"author":{"name":"wp_An0nBLoG","@id":"https:\/\/anon.tools\/public\/blog\/#\/schema\/person\/c08bec5f31609e1ba68526ed2797c2a5"},"headline":"Hex Color Converter Convert HEX Strings to UIColor and Color in iOS Design","datePublished":"2024-04-09T05:18:06+00:00","dateModified":"2024-04-09T05:18:06+00:00","mainEntityOfPage":{"@id":"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/"},"wordCount":736,"commentCount":0,"publisher":{"@id":"https:\/\/anon.tools\/public\/blog\/#organization"},"image":{"@id":"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#primaryimage"},"thumbnailUrl":"https:\/\/anon.tools\/public\/blog\/wp-content\/uploads\/2024\/04\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design-1712634365.webp","keywords":["Hex color converter UIColor iOS design"],"articleSection":["Design"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/","url":"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/","name":"Hex Color Converter Convert HEX Strings to UIColor and Color in iOS Design","isPartOf":{"@id":"https:\/\/anon.tools\/public\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#primaryimage"},"image":{"@id":"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#primaryimage"},"thumbnailUrl":"https:\/\/anon.tools\/public\/blog\/wp-content\/uploads\/2024\/04\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design-1712634365.webp","datePublished":"2024-04-09T05:18:06+00:00","dateModified":"2024-04-09T05:18:06+00:00","description":"Hex color converter: Easily convert HEX strings to UIColor and color in iOS design. Perfect tool for developers and designers.","breadcrumb":{"@id":"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#primaryimage","url":"https:\/\/anon.tools\/public\/blog\/wp-content\/uploads\/2024\/04\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design-1712634365.webp","contentUrl":"https:\/\/anon.tools\/public\/blog\/wp-content\/uploads\/2024\/04\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design-1712634365.webp","width":942,"height":628,"caption":"hex color converter"},{"@type":"BreadcrumbList","@id":"https:\/\/anon.tools\/public\/blog\/hex-color-converter-convert-hex-strings-to-uicolor-and-color-in-ios-design\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/anon.tools\/public\/blog\/"},{"@type":"ListItem","position":2,"name":"Hex Color Converter Convert HEX Strings to UIColor and Color in iOS Design"}]},{"@type":"WebSite","@id":"https:\/\/anon.tools\/public\/blog\/#website","url":"https:\/\/anon.tools\/public\/blog\/","name":"Anon Tools Blog","description":"Digital Tools, Guarded Secrets","publisher":{"@id":"https:\/\/anon.tools\/public\/blog\/#organization"},"alternateName":"AnonTools Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/anon.tools\/public\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/anon.tools\/public\/blog\/#organization","name":"Anon Tools Blog","url":"https:\/\/anon.tools\/public\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/anon.tools\/public\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/anon.tools\/public\/blog\/wp-content\/uploads\/2024\/04\/cropped-anon.png","contentUrl":"https:\/\/anon.tools\/public\/blog\/wp-content\/uploads\/2024\/04\/cropped-anon.png","width":512,"height":512,"caption":"Anon Tools Blog"},"image":{"@id":"https:\/\/anon.tools\/public\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/anon.tools\/public\/blog\/#\/schema\/person\/c08bec5f31609e1ba68526ed2797c2a5","name":"wp_An0nBLoG","sameAs":["https:\/\/anon.tools\/public\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/anon.tools\/public\/blog\/wp-json\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/anon.tools\/public\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anon.tools\/public\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anon.tools\/public\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/anon.tools\/public\/blog\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":0,"href":"https:\/\/anon.tools\/public\/blog\/wp-json\/wp\/v2\/posts\/52\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/anon.tools\/public\/blog\/wp-json\/wp\/v2\/media\/53"}],"wp:attachment":[{"href":"https:\/\/anon.tools\/public\/blog\/wp-json\/wp\/v2\/media?parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anon.tools\/public\/blog\/wp-json\/wp\/v2\/categories?post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anon.tools\/public\/blog\/wp-json\/wp\/v2\/tags?post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}