The home indicator color is determined automatically based on the color of the content below it.
Most of the time, this means you should not worry about its color since it is out of your control, and will always be clearly visible to users.
However, you can place a colored view in the area behind the home indicator to manipulate its color.
Examples
(Please note that these examples were taken on the iOS simulator, and behavior on a real device is different.)
Background: white (#ffffff
)
Home Indicator: black (#000000
)
Background: black (#000000
)
Home Indicator: gray (#484848
)
Background: gray (#5f5f5f
)
Home Indicator: dark gray (#282828
)
Background: blue (#1a98fc
)
Home Indicator: very dark gray (#121212
)
I wrote an in-depth article about the home indicator color if you want to learn more about its behavior: Reverse-Engineering the iPhone X Home Indicator Color
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…