I have a simple solution for you, please have a look.
1) Open
TopicBlock.cshtml view, looking for following lines of code
<div class="topic-block" id="[email protected]">
and that one
<div class="topic-block">
replace them to
<div class="topic-block [email protected]" id="[email protected]">
and
<div class="topic-block [email protected]">
2) In your stylesheet file, you can style each type of topic block based on the rendered CSS class in above view.
For example, the "Search engine friendly page name" for HomePageText topic is "welcome-to-our-store".
So that, its CSS class will be "topic-block--welcome-to-our-store".
And then, you can set styles for that CSS class like:
.topic-block--welcome-to-our-store {
background-color: blue;
}
The same method will be applied for other topic blocks.
Hope that help :)