This commit is contained in:
@@ -187,7 +187,7 @@ namespace AyaNova.Api.Controllers
|
||||
var s = new PersonalScheduleListItem();
|
||||
s.Id = v.Id;
|
||||
s.Color = p.Dark ? WHITE_HEXA : BLACK_HEXA;
|
||||
s.TextColor = p.Dark ? BLACK_HEXA : WHITE_HEXA;
|
||||
s.TextColor = p.Dark ? "black" : "white";
|
||||
s.Start = (DateTime)v.ReviewDate;
|
||||
s.End = (DateTime)v.ReviewDate.AddMinutes(30);//just something to show in schedule as not supporting all day or unscheduled type stuff
|
||||
s.Type = AyaType.Review;
|
||||
@@ -223,7 +223,8 @@ namespace AyaNova.Api.Controllers
|
||||
var g = StringUtil.HexToInt(hexcolor.Substring(2, 2));
|
||||
var b = StringUtil.HexToInt(hexcolor.Substring(4, 2));
|
||||
var yiq = (r * 299 + g * 587 + b * 114) / 1000;
|
||||
return yiq >= 128 ? WHITE_HEXA : BLACK_HEXA;
|
||||
//return yiq >= 128 ? WHITE_HEXA : BLACK_HEXA;
|
||||
return yiq >= 128 ? "black" : "white";//<---NOTE: this MUST be a named color due to how the style is applied at client
|
||||
}
|
||||
|
||||
private static string NameFromWOItem(ViewSchedulePersonalWorkOrder v, PersonalScheduleParams p)
|
||||
|
||||
Reference in New Issue
Block a user