{"id":244,"date":"2010-01-29T10:04:58","date_gmt":"2010-01-29T17:04:58","guid":{"rendered":"http:\/\/fidgetware.com\/wordpress\/?p=244"},"modified":"2011-01-07T15:58:32","modified_gmt":"2011-01-07T22:58:32","slug":"interface-builder-woes","status":"publish","type":"post","link":"https:\/\/fidgetware.com\/wordpress\/?p=244","title":{"rendered":"Interface Builder Woes"},"content":{"rendered":"<p>For my big sweat equity project that I am working on I get graphics from a graphic artist to use in the application.\u00a0 But sometimes I need to create a background that matches the color of an image I have received.<\/p>\n<p><img loading=\"lazy\" class=\"alignright size-full wp-image-245\" title=\"Color Dialog\" src=\"http:\/\/fidgetware.com\/blog\/wp-content\/uploads\/2010\/01\/Screen-shot-2010-01-29-at-1-29-10-9.29.43-AM.png\" alt=\"Color Dialog\" width=\"216\" height=\"371\" srcset=\"https:\/\/fidgetware.com\/wordpress\/wp-content\/uploads\/2010\/01\/Screen-shot-2010-01-29-at-1-29-10-9.29.43-AM.png 216w, https:\/\/fidgetware.com\/wordpress\/wp-content\/uploads\/2010\/01\/Screen-shot-2010-01-29-at-1-29-10-9.29.43-AM-174x300.png 174w\" sizes=\"(max-width: 216px) 100vw, 216px\" \/>It sounds easy and it should be easy.\u00a0 I do not know if some setting of mine has been messed up or if\u00a0 this has always been the case, but the colors in Interface Builder do not match the colors in the final application.\u00a0 I even went back to some of the very first applications that I created and checked with DigitalColor Meter a neat application for returning the color under the mouse pointer.<\/p>\n<p>The first thing I noticed is that the images once dropped into interface builder seem to be a bit darker.\u00a0 To change the color of an item you click on the color swatch to open the color dialog box.\u00a0 Now to match a color all you need to do is click on the magnifying glass and you can now use the magnifying glass to choose the color of any item on your desktop.\u00a0 The first thing I tried was to naturally click on the graphic that I wanted to match in IB.\u00a0 No go!\u00a0 A recompile and then a view in simulator and the colors do not match.\u00a0 I then open the graphics in preview as that displayed the image correctly.\u00a0 I tried the color match again with the magnifying glass and still no match.\u00a0 After trying many different things I noticed that when you use the rgb sliders you have the option to change the color space.\u00a0 After selecting the matching color with the magnify glass the color space is set to &#8220;device RGB&#8221;.<\/p>\n<p>I changed it to &#8220;generic RGB&#8221; and the slider values changed, but the color swatch remained the same color.\u00a0 The next trick is to write down the color values when &#8220;device RGB&#8221; is selected and transfer those values to when &#8220;generic RGB&#8221; is selected.\u00a0 When you make the change the color will not match in IB, but match in the final product.\u00a0 I think I need to find out more about this problem.\u00a0 I should not have to jump through these hoops.\u00a0 Hopefully it is something simple.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For my big sweat equity project that I am working on I get graphics from a graphic artist to use in the application.\u00a0 But sometimes I need to create a background that matches the color of an image I have received. It sounds easy and it should be easy.\u00a0 I do not know if some [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[20],"_links":{"self":[{"href":"https:\/\/fidgetware.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/244"}],"collection":[{"href":"https:\/\/fidgetware.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fidgetware.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fidgetware.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fidgetware.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=244"}],"version-history":[{"count":5,"href":"https:\/\/fidgetware.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/244\/revisions"}],"predecessor-version":[{"id":490,"href":"https:\/\/fidgetware.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/244\/revisions\/490"}],"wp:attachment":[{"href":"https:\/\/fidgetware.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fidgetware.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fidgetware.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}