* GUI: new reworked GUI and card render engine, card icons and dozens of other fixes (see full list in related PR);

This commit is contained in:
Oleg Agafonov 2021-01-30 16:38:55 +04:00
parent df98cc3e62
commit a1da5ef437
304 changed files with 7266 additions and 5093 deletions

View file

@ -31,7 +31,7 @@ public class HintUtils {
// text
if (text != null && color != null) {
String hex = String.format("#%02x%02x%02x", color.getRed(), color.getGreen(), color.getBlue());
String hex = colorToHtml(color);
res = String.format("<font color=%s>%s</font>", hex, text);
} else {
res = text;
@ -55,4 +55,14 @@ public class HintUtils {
}
}
}
/**
* Conver color to html hex format like #7FFFD4
*
* @param color
* @return
*/
public static String colorToHtml(Color color) {
return String.format("#%02x%02x%02x", color.getRed(), color.getGreen(), color.getBlue());
}
}