diff --git a/app/assets/stylesheets/habits.css.scss b/app/assets/stylesheets/habits.css.scss index e30a80baa2..4c67915919 100644 --- a/app/assets/stylesheets/habits.css.scss +++ b/app/assets/stylesheets/habits.css.scss @@ -2,14 +2,13 @@ // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ -.bad, .bad a{ - background-color:rgb(224, 102, 102); - color:white !important; - } -.iffy { background-color:rgb(246, 178, 107); } -.ok { background-color:rgb(255, 217, 102); } -.good { background-color:rgb(147, 196, 125); } -.done { background-color:rgb(201, 218, 248); } +.color-red { background-color: rgb(230, 184, 175); } +.color-pink { background-color: rgb(244, 204, 204); } +.color-orange { background-color: rgb(252, 229, 205); } +.color-yellow { background-color: rgb(255, 242, 204); } +.color-green { background-color: rgb(217, 234, 211); } +.color-light-blue { background-color: rgb(208, 224, 227); } +.color-blue { background-color: rgb(201, 218, 248); } .panel { vertical-align:top; diff --git a/app/helpers/habits_helper.rb b/app/helpers/habits_helper.rb index fee9a45ffc..6e1d15d339 100644 --- a/app/helpers/habits_helper.rb +++ b/app/helpers/habits_helper.rb @@ -11,11 +11,13 @@ module HabitsHelper def score_color(habit) s = habit.score case - when s<-5 then return 'bad' - when s>=-5 && s<0 then return 'iffy' - when s>=0 && s<5 then return 'ok' - when s>=5 && s<15 then return 'good' - when s>=15 then return 'done' + when s<-8 then return 'color-red' + when s>=-8 && s<-4 then return 'color-pink' + when s>=-4 && s<0 then return 'color-orange' + when s>=0 && s<1.5 then return 'color-yellow' + when s>=1.5 && s<5 then return 'color-green' + when s>=5 && s<10 then return 'color-light-blue' + when s>=10 then return 'color-blue' end end