16

Possible Duplicate:
Fix for Xcode's indiscernible highlighting of inline errors?

Does anyone know how to change the color of the in-line highlighting for warnings and errors in Xcode 4? With almost every theme, the yellow warning highlight makes the underlying code impossible to read. Example picture

Community
  • 1
  • 1
Jameson
  • 968
  • 1
  • 11
  • 24

3 Answers3

12

Just came across this, which seems to be able to modify some of Xcode's behaviors by creating some sort of plugin. Maybe one can be developed to change text highlight color. http:/github.com/davekeck/Xcode-4-Fixins

Update:

I've finally managed to implement a Xcode "fixin" to do it.
text highlight for dark backgrounds

You just need to open the project and build it. Doing so will install an Xcode plugin called "XCFixin_CustomizeWarningErrorHighlights.xcplugin" into ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins. You can of course customize the colors to your liking.

Get the "fixin" here:

https://github.com/armadillu/Xcode-4-Fixins/tree/master/XCFixin_CustomizeWarningErrorHighlights

amadillu
  • 4,349
  • 1
  • 16
  • 15
  • Wow. Amazing. These Fix-Ins solve almost ALL of my Xcode pet-peeves. Is there one to fix [sytax highlighting](http://stackoverflow.com/questions/10013437/why-does-xcode-4-3-syntax-highlighting-break-on-some-64-bit-projects), too? Or maybe re-enable plug-in support? My compliments to the chef. – Alex Gray May 06 '12 at 11:03
  • I dont understand how to change the settings. The readme says "change the scheme" what scheme? – Rhubarb Oct 01 '12 at 11:50
  • Doesn't work for me at all - I think I'm using it wrong. I downloaded all of the projects, opened the warning-highlight in xcode 4.3, added 2 test lines with unused variables, Build the project, quit and restarted xcode, no change. I even changed the warningColor to red (1,0,0) instead of yellow to see if the change was picked up... nothing happening, what am I missing. – Rhubarb Oct 01 '12 at 13:46
  • You should go to https://github.com/armadillu/Xcode-4-Fixins and download the zip file (cloud icon with arrow). Unzip, go into the XCFixin_CustomizeWarningErrorHighlights dir and open the Xcode project in there. Once it's open, just build the project on Xcode. Then quit and relaunch Xcode, and from now on, all the inline warnings and errors should look as they do in the picture above. You can tweak the colors to your liking by modifying the RGB values within the project. This requires Xcode 4.3 or greater for it to work. – amadillu Oct 05 '12 at 12:01
  • I did all of that before my prior comment. But nothing changes. I set my warningColor to 1,0,0, just to see if the fixin was having _any_ effect, and nothing changed -I still see the original builtin highlight. I changed my theme from Dusk to Midnight to see if that did anything - no dice. I'm doing something wrong. My XCode is 4.3. My Scheme is "XCFixin_CustomizeWarningErrorHighlights>My Mac 64-bit", I build the project with command B, then quit xcode altogether. Restart - no change. – Rhubarb Oct 10 '12 at 10:34
  • Got it! Your last commit to update it for XCode 4.4 breaks it for XCode 4.3. I reversed the changes you put in that commit (basically a new signature for initWithHighlightColor) and it now works - thanks – Rhubarb Oct 15 '12 at 10:39
  • Thanks for this! I changed the line opacity to 0.05, which is more than obvious enough to me on my dark background while allowing the text to actually be readable. :) – devios1 Mar 11 '13 at 22:26
1

There is no (official) way to do this and I believe that it's like that for a reason... We all know how much attention to details and UI paradigms Apple is paying. An error colored in Green for example would break that paradigm and possibly confuse the user. That being said, I think that a (somewhat) solution would be instead of recoloring the warning/error bubbles, to recolor the theme in such a way that every color would make a strong contrast with red/yellow (ie avoid reddish/yellowish tones) tints.

Alladinian
  • 34,483
  • 6
  • 89
  • 91
0

there is no options which you can change color of warning and errors.its inbuilt with Theme you are using for xcode. but you can change the style from xcode->fonts & colors and select different theme.

ALpesH
  • 23
  • 2
  • 7