diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -627,7 +627,7 @@ public: for (CompanyID k = COMPANY_FIRST; k < MAX_COMPANIES; k++) { const Company *c = Company::GetIfValid(k); if (c != nullptr) { - this->colours[numd] = _colour_gradient[c->colour][6]; + this->colours[numd] = GetColourGradient(c->colour, 6); for (int j = this->num_on_x_axis, i = 0; --j >= 0;) { if (j >= c->num_valid_stat_ent) { this->cost[numd][i] = INVALID_DATAPOINT; @@ -1294,8 +1294,8 @@ struct PerformanceRatingDetailWindow : W ScoreID score_type = (ScoreID)(widget - WID_PRD_SCORE_FIRST); /* The colours used to show how the progress is going */ - int colour_done = _colour_gradient[COLOUR_GREEN][4]; - int colour_notdone = _colour_gradient[COLOUR_RED][4]; + int colour_done = GetColourGradient(COLOUR_GREEN, 4); + int colour_notdone = GetColourGradient(COLOUR_RED, 4); /* Draw all the score parts */ int64_t val = _score_part[company][score_type];