Every color in the code gets a small swatch in front of it. Click a swatch to open the color picker; the color in the code changes as you pick, and Ctrl or ⌘ Z brings the old one back.
Gestalt theme colors are written like var(--g-brand). They follow light and dark mode and the colors an admin sets, so they are usually better than a typed-in color such as #ff4d1c. In CSS, and in the style parts of HTML and SVG, type -- to see them all, each with its swatch.
In a project that already uses theme colors, a typed-in color gets a wavy underline. Point at it to see which theme color looks the same, and click Use to swap it in. Colors you name yourself (--accent: #d61f9e) and fallbacks inside var() are left alone.
Turn all of this off in Settings → Editor → Color helpers.