In the Apple documentation under Adaptable Gray Colors I can read that they provide, among other colors:
- systemGray2Color
- systemGray3Color
- systemGray4Color
- systemGray5Color
- systemGray6Color
In the Interface Builder of Xcode (Version 11.2.1) I can see systemGrayColor but non of the other shades of gray:
How do I set those other system gray colors in the Interface Builder?
Ok, I could use the color by manually changing it in the underlaying XML.
I changed the
systemColor
attribute of thecolor
XML element.System Gray Color
Open as
->Source Code
entrycolor
XML elementsystemColor="systemGrayColor"
tosystemColor="systemGray2Color"
for color system gray 2.red
,green
andblue
color attributes of the same XML key also gets adjusted.Resulting in:
As mentiond in the question already there are the following shades of gray supported:
My tests revealed if you misspell the color or use a not supported shade the Interface Builder will show black color instead.
This was done using Xcode Version 11.2.1.
This is a known bug in Xcode and will be fixed in the upcoming Xcode 11.4: