Indexed colours, better image handling, lines cut at 74:
[jvcard.git] / src / be / nikiroo / jvcard / tui / UiColors.java
index 5c5d01eebcf32e3f1611a3daece2f14ae30f3d18..50c2bf4fafdb698d1d7dd5ac94f5bff99ae7857c 100644 (file)
@@ -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);
                        }