The first question is what theme are you using? What CSS works or not will vary by theme.
If you are using the default theme (and many others), this will work for Editing and Reading views:
body {
--h1-color: var(--color-red);
--h2-color: var(--color-orange);
--h3-color: var(--color-yellow);
--h4-color: var(--color-green);
--h5-color: var(--color-blue);
--h6-color: var(--color-purple);
}
The var(...
sections can be replaced with red
, #ff0000
, etc.