@qnguyen
The ways to change the colors are through CSS or JavaScript. Both require that you do this at the global account level by uploading the files through the theme editor. I cannot help with overriding that.
It is not necessarily true that this will affect all courses. It does mean that you need to hard-code the change and then rely on either a CSS selector or JavaScript check to make sure you're in the courses that you want to change.
The easiest way is probably using the custom global CSS file. That used to be global with no good way to discriminate between courses, but there is now a context-course_896851 (where 896851 is the Canvas Course ID) class attached to the body element. If you wanted to change the color of module titles, you need the selector for those. Canvas is styling it using .ig-header .name { color: #3d454c;}.
To override that, you should probably provide a CSS selector with a higher specificity. The order that the files load in is not guaranteed anymore, so you need to make sure that yours overrides theirs. Putting it inside the #context_modules selector should do that.
Now, if you want that to only happen on in a single course, then you add the selector to the body.
This will give me this in course 896851 (the red box is just
But it would look like this in a different course
If you need to have it happen in multiple courses, then you can use multiple CSS selectors.
Through JavaScript, I would check the window.location.pathname to see if the course ID is there.
For a single course, you could do select the courses to act on using something like this:
if (/^\/courses\/(896851)(\/modules)?$/.test(window.location.pathname)) {
}
It acts on the course home page, which may not be the modules page, or the modules page.
The (896851) does not need to be in parentheses, however, putting it into parentheses allows you to list multiple courses using regular expressions. You could use (896851|1024566|1234125) to get any of those three courses.
There are other ways to accomplish this without hard-coding it into the global CSS or JavaScript files. You still have to use those, but it could make an API call to see if the course you're in is one that needs applied. That call gets made for every user in every course, though, so it's probably easier to hard-code them and update the files each time.
If you only need to change some titles and not all of them, then you're making it even harder. Unless there is some easy way to distinguish which modules need their titles changed, like ones that are currently open, or ones that contain certain words in them, then you're going to have to be creative. That also means that the CSS route is going to be more challenging.
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.