X-Git-Url: https://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Fjvcard%2Ftui%2FUiColors.java;h=50c2bf4fafdb698d1d7dd5ac94f5bff99ae7857c;hb=1c03abafc3987d93fa682e7b8758e51bed8a4faf;hp=5c5d01eebcf32e3f1611a3daece2f14ae30f3d18;hpb=e253bd50bb05519f4a16fed4fb95d5b3340128ea;p=jvcard.git diff --git a/src/be/nikiroo/jvcard/tui/UiColors.java b/src/be/nikiroo/jvcard/tui/UiColors.java index 5c5d01e..50c2bf4 100644 --- a/src/be/nikiroo/jvcard/tui/UiColors.java +++ b/src/be/nikiroo/jvcard/tui/UiColors.java @@ -220,6 +220,8 @@ public class UiColors { int g = Integer.parseInt(value.substring(3, 5), 16); int b = Integer.parseInt(value.substring(5, 7), 16); return new TextColor.RGB(r, g, b); + } else if (value.replaceAll("[0-9]*", "").length() == 0) { + return new TextColor.Indexed(Integer.parseInt(value)); } else { return TextColor.ANSI.valueOf(value); }