@@ -65,12 +65,19 @@ namespace Moon {
6565 * @return A color vector (RGBA).
6666 */
6767 vec4 PhaseColorForTitleLower(const string & in t) {
68- switch (GetPhaseKind(t)) {
69- case PhaseKind :: PK_NM : return vec4(0.5 , 0.5 , 0.5 , 1.0 ); // Grey
70- case PhaseKind :: PK_FQ : return vec4(0.6 , 0.6 , 0.6 , 1.0 ); // Light Grey
71- case PhaseKind :: PK_FM : return vec4(0.7 , 0.7 , 0.7 , 1.0 ); // Lighter Grey
72- case PhaseKind :: PK_LQ : return vec4(0.4 , 0.4 , 0.4 , 1.0 ); // Dark Grey
73- default : return vec4(0.3 , 0.3 , 0.3 , 1.0 ); // Darkest Grey (Intermediate)
68+ // Brightness follows the real illuminated fraction of the Moon's disc,
69+ // but kept in a mid range so the button text stays readable on every phase
70+ // (a near-white background would hide the light text).
71+ // Full Moon = brightest
72+ // First/Last Qtr = mid
73+ // Intermediate = darker
74+ // New Moon = darkest
75+ switch (GetPhaseKind(t)) {
76+ case PhaseKind :: PK_FM : return vec4(0.62 , 0.62 , 0.62 , 1.0 ); // Full Moon - brightest (still readable)
77+ case PhaseKind :: PK_FQ : return vec4(0.52 , 0.52 , 0.52 , 1.0 ); // First Quarter - mid
78+ case PhaseKind :: PK_LQ : return vec4(0.52 , 0.52 , 0.52 , 1.0 ); // Last Quarter - mid
79+ case PhaseKind :: PK_NM : return vec4(0.34 , 0.34 , 0.34 , 1.0 ); // New Moon - darkest
80+ default : return vec4(0.43 , 0.43 , 0.43 , 1.0 ); // Intermediate - between new & quarter
7481 }
7582 }
7683
@@ -106,8 +113,8 @@ namespace TimeUtils {
106113 string FriendlyDeltaLong(int64 deltaMs) {
107114 int64 totalSeconds = Math :: Abs(deltaMs) / 1000 ;
108115
109- int days = int (totalSeconds / 86400 ); totalSeconds %= 86400 ;
110- int hours = int (totalSeconds / 3600 ); totalSeconds %= 3600 ;
116+ int days = int (totalSeconds / 86400 ); totalSeconds %= 86400 ;
117+ int hours = int (totalSeconds / 3600 ); totalSeconds %= 3600 ;
111118 int minutes = int (totalSeconds / 60 );
112119 int seconds = int (totalSeconds % 60 );
113120
0 commit comments