Conditional change row colors Say I have a content type "task" with one field "status", which is output by views. Now I want when the status is "finished", the color of that row will be red, when the status is "failed", the color of that row will be yellow, when the status is "ongoing", the color of that row will be green. 
Is there any way to realize this? BTW, I know very little about code.
There are 2 ways to do this, but you should do this the Drupal way. 


You can use JavaScript to iterate through each &lt;tr&gt; adding a class to the &lt;tr&gt; if it finds finished in the last column. 
You can do it the Drupal way in views. I assume you are using the table view to output your data since that's what you are showing us.


Under your edit view mode, you'll see "Format" and then "Format:Table | Settings".

Click on Settings. Under settings you should see an option that says "Row Class". 

You want to set your row class equal to the value of the status field. To do this. Look under Fields to find the field that is displaying your status column and click to edit it. Once there, select "Rewrite results" and then click the "Override the output of this field with custom text" checkbox. 

This will open a textbox with an option below it stating "Replacement Patterns." when you click this, you should see some options inside of {{ }}. There will likely be one that looks something like {{ status }} == Status.

The {{ status }} part is your replacement pattern. Copy it and paste it into the row class field under table settings. 

What this will do is add a class to your &lt;tr&gt; in your view. 

Example of what the view output will then look like:

&lt;tr class="finished"&gt;
  &lt;td&gt;3/5/19&gt;
  &lt;td&gt;write article&lt;/td&gt;
  &lt;td&gt;finished&lt;/td&gt;
&lt;/tr&gt;


After completing this step, you need to add a bit of CSS to your stylesheet in your theme.

Something like:

tr.finished td { color: red; }
tr.ongoing td { color: green; }
tr.failed td { color: yellow; }


So you end up changing the row class to be the replacement pattern of your status field and adding 3 lines of CSS code to your theme's style sheet.