/** * Get string for hrv score * @return string */ public function fitHRVscore() { if ($this->Activity->fitHRVscore() > 0) { $hue = 128 - 64 * ($this->Activity->fitHRVscore() / 1000); $tooltip = Ajax::tooltip('', __('HRV score') . ': ' . round($this->Activity->fitHRVscore()), false, true); return '<i class="fa fa-fw fa-dot-circle-o" style="color:hsl(' . min(128, max(0, round($hue))) . ',74%,44%);" ' . $tooltip . '></i>'; } return ''; }