Search code examples
xcodecolorsconventions

What are the color conventions in Xcode viewcontroller.swift?


New to Xcode 10 and Swift. I've noticed that when you type code into the ViewController.swift page the text is color-coded. In my current theme, I have figured out a few of them: Variables, constants, braces and math functions = black. Commented sections = grey. User-defined numbers = blue, etc.

My questions are: Is there a guide as to what these colors all correspond to?

Regardless of what the color actually is, are there certain elements(?) that will always be assigned a specific color for easier readability?

My Google searches only returned results on color manipulation in regards to Xcode/Swift.


Solution

  • If you open Xcode's preferences and go to "Fonts & Colors" you can see the current theme and others, and its setting.

    enter image description here