diff --git a/jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java b/jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java index 4c6476bc..aab878ee 100644 --- a/jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java +++ b/jansi/src/main/java/org/fusesource/jansi/AnsiOutputStream.java @@ -272,9 +272,13 @@ private boolean processEscapeCommand(ArrayList options, int command) thr count++; int value = ((Integer)next).intValue(); if( 30 <= value && value <= 37 ) { - processSetForegroundColor(value-30); + processSetForegroundColor(value-30, false); } else if( 40 <= value && value <= 47 ) { - processSetBackgroundColor(value-40); + processSetBackgroundColor(value-40, false); + } else if ( 90 <= value && value <= 97 ) { + processSetForegroundColor(value-90, true); + } else if ( 100 <= value && value <= 107 ) { + processSetBackgroundColor(value-100, true); } else { switch ( value ) { case 39: @@ -401,10 +405,10 @@ protected void processSetAttribute(int attribute) throws IOException { protected static final int CYAN = 6; protected static final int WHITE = 7; - protected void processSetForegroundColor(int color) throws IOException { + protected void processSetForegroundColor(int color, boolean bright) throws IOException { } - protected void processSetBackgroundColor(int color) throws IOException { + protected void processSetBackgroundColor(int color, boolean bright) throws IOException { } protected void processDefaultTextColor() throws IOException { diff --git a/jansi/src/main/java/org/fusesource/jansi/HtmlAnsiOutputStream.java b/jansi/src/main/java/org/fusesource/jansi/HtmlAnsiOutputStream.java index 5f97cabf..8fd8f63e 100644 --- a/jansi/src/main/java/org/fusesource/jansi/HtmlAnsiOutputStream.java +++ b/jansi/src/main/java/org/fusesource/jansi/HtmlAnsiOutputStream.java @@ -127,12 +127,12 @@ protected void processAttributeRest() throws IOException { } @Override - protected void processSetForegroundColor(int color) throws IOException { + protected void processSetForegroundColor(int color, boolean bright) throws IOException { writeAttribute("span style=\"color: " + ANSI_COLOR_MAP[color] + ";\""); } @Override - protected void processSetBackgroundColor(int color) throws IOException { + protected void processSetBackgroundColor(int color, boolean bright) throws IOException { writeAttribute("span style=\"background-color: " + ANSI_COLOR_MAP[color] + ";\""); } } diff --git a/jansi/src/main/java/org/fusesource/jansi/WindowsAnsiOutputStream.java b/jansi/src/main/java/org/fusesource/jansi/WindowsAnsiOutputStream.java index e96ff4d9..ab93deb7 100644 --- a/jansi/src/main/java/org/fusesource/jansi/WindowsAnsiOutputStream.java +++ b/jansi/src/main/java/org/fusesource/jansi/WindowsAnsiOutputStream.java @@ -227,13 +227,13 @@ protected void processCursorToColumn(int x) throws IOException { } @Override - protected void processSetForegroundColor(int color) throws IOException { + protected void processSetForegroundColor(int color, boolean bright) throws IOException { info.attributes = (short)((info.attributes & ~0x0007 ) | ANSI_FOREGROUND_COLOR_MAP[color]); applyAttribute(); } @Override - protected void processSetBackgroundColor(int color) throws IOException { + protected void processSetBackgroundColor(int color, boolean bright) throws IOException { info.attributes = (short)((info.attributes & ~0x0070 ) | ANSI_BACKGROUND_COLOR_MAP[color]); applyAttribute(); }