How do I change color of the number (text-color) based on the value of the number.
So basically I have a database where I store data in like temperature, humidity, pressure, ammoniac values. I fetch this data and show it on an overview / table on my website. It will show the latest entry in the database.
Now if the temperature has a very low/cold value like 5 degrees celsius or somewhere in the minus the number will be red. If the temperature value is between 19-26 degrees celsius it will be green. If its high temperature like 31 degrees celsius it will be red. Also orange color amidst.

How can I create/realize this? Through jquery or javascript or even css. Could you guys help me? Here is my code for everything. 

EDITED
So I tried both Adams code and devpros code. Both seem to work with the good/green temperature, so I decided to mix both parts and came up with this code with orange and red. But Orange and red don't seem to work. Could you guys help me?

```
     <?php
                                require_once "dbconnect.php";
                                echo '<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
                                <tr>
                                <th>Date</th>
                                <th>Temperatuur</th>

                                <th>Humidity</th>
                                <th>Dust</th>
                                <th>CO2</th>
                                <th>Ammoniac</th>
                                <th>Pressure</th>
                                </tr>';

                                $result = $conn->prepare("SELECT * FROM `Climate_Data` ORDER BY `ID` DESC LIMIT 1");
                                    $result->execute();

                                      //Set a default class, just in case no temps match
  $scoreClass = 'reg-temp-class';

  for($i=0; $row = $result->fetch(); $i++){

      //Temp is between 19 and 26 (can be equal to 19 or 26 as well)
      if ($row['temperature'] >= 16 && $row['temperature'] <= 27){
          $scoreClass = 'green';
      }
      elseif ($row['temperature'] <= 15 && $row['temperature'] >= 27){
          $scoreClass = 'orange';
      }
      elseif ($row['temperature'] <= 5 && $row['temperature'] >= 31){
          $scoreClass = 'red';
      }
      echo "<tr>";
      echo "<td>" . $row['Date'] . "</td>";
      echo "<td class='".$scoreClass."'>" . $row['temperature'] . "</td>";
      echo "<td>" . $row['Humidity'] . "</td>";
      echo "<td>" . $row['dust'] . "</td>";
      echo "<td>" . $row['co2'] . "</td>";
      echo "<td>" . $row['ammoniac'] . "</td>";
      echo "<td>" . $row['pressure'] . "</td>";
      echo "</tr>";

  }

                                echo "</table>";
       ?>

     <style>
   .green {
  color: green;
     }
    .orange {
    color: orange;
    }
    .red {
      color: red;
    }
  </style>

```

I am up for anything jquery etc. I just need help with this. I am using the bulma framework. But if you all know of any other or better way of presenting this instead of a long table it would be appreciated. I just want something nice looking maybe even a list. Thanks in advance!