Exemple #1
0
 private Color CalculateTextColor(AdvancedColor color)
 {
     var copy = color.Copy();
     if(color.L < 0.4)
         copy.L = copy.L + 0.2;
     else
         copy.L = copy.L - 0.2;
     copy.S = 0.6 - copy.L / 1.6;
     return copy;
 }
Exemple #2
0
 //TODO: Move to model?
 private static Color CalculateBorderColor(AdvancedColor backgroundColor)
 {
     var copy = backgroundColor.Copy();
     copy.S *= 0.9d;
     copy.L = copy.L*1.03 + 0.02;
     return copy;
 }