Where are gray colors in the theme are defined and how can we override them?

If an Ionic app is built with the default theme, that is, without touching its theming code (scss); and it is being viewed on (say) an Android platform in the default ‘md’, ‘Light’ mode. Then…

The UI will contain the 9 colors (primary, secondary, tertiary, and so on), AND shades of gray applied to some elements and controls.

I understand that I can customize those 9 colors (primary, secondary, tertiary, and so on), by changing the values of the variables in the file varialbles.scss. But I don’t understand from where the gray shades in the UI are being defined, and how I can customize or override those gray colors as per my requirements.