The International Simutrans Forum

 

Author Topic: [r8134] Incorrect calculation for station name text color  (Read 405 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran

  • Devotee
  • *
  • Posts: 1548
  • Languages: ja
[r8134] Incorrect calculation for station name text color
« on: December 04, 2020, 03:06:59 AM »
This issue was pointed out by freddyhayward in the incorporating changes from standard thread.

If the display mode of the station name label is player color text, the player color is incorrect.
This display mode is one of the options, but in extended it is the default display mode. (Standard is not)

I knew that theme could change the brightness of the color of the text, so I was guessing that was the cause, but as freddy pointed out, the color is bluish, so I checked the code and found this looks like unintended behavior.

At first glance, this color difference is hard to notice.

here are some screenshots:
The image above shows the changes before and after r8134. But this change is the same as the current standard.

First of all, the player color of the station name will be darkened in all selected colors.
If you look closely, the public player color, which should be gray, is more blue.

For example, a color that is supposed to be RGB (165,162,165) changes to RGB (165,162,189).


I think this is due to the code below.
https://github.com/aburch/simutrans/blob/8e27675a46d3ccb03bb53080f0bb03788509a0d8/boden/grund.cc#L1684


I guess that increasing FLAGGED_PIXVAL pc by +3 will only brighten blue.
Originally, I think that the correct behavior is to have 3 gradations of bright colors.

Online Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4878
  • Languages: EN, DE, AT
Re: [r8134] Incorrect calculation for station name text color
« Reply #1 on: December 04, 2020, 06:40:17 AM »
Good spot! I wonder if there are more bugs of this type in the code.

Online Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4878
  • Languages: EN, DE, AT
Re: [r8134] Incorrect calculation for station name text color
« Reply #2 on: December 04, 2020, 05:10:30 PM »
should be fixed in r9475.

Offline Ranran

  • Devotee
  • *
  • Posts: 1548
  • Languages: ja
Re: [r8134] Incorrect calculation for station name text color
« Reply #3 on: December 05, 2020, 04:05:12 PM »
I confirmed that it has been fixed. Thank you very much.  :)