From 1162c8a032e8868de7be6c149eb92fe9bc8c7fb8 Mon Sep 17 00:00:00 2001 From: mattirn Date: Sat, 2 Jan 2021 10:34:52 +0100 Subject: [PATCH] Fix AttributedStyle calculations for true colors, fixes #305 --- terminal/src/main/java/org/jline/utils/AttributedStyle.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/terminal/src/main/java/org/jline/utils/AttributedStyle.java b/terminal/src/main/java/org/jline/utils/AttributedStyle.java index c106abc22..97d13770b 100644 --- a/terminal/src/main/java/org/jline/utils/AttributedStyle.java +++ b/terminal/src/main/java/org/jline/utils/AttributedStyle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2020, the original author or authors. + * Copyright (c) 2002-2021, the original author or authors. * * This software is distributable under the BSD license. See the terms of the * BSD license in the documentation provided with this software. @@ -44,8 +44,8 @@ public class AttributedStyle { static final long MASK = 0x00001FFF; - static final int FG_COLOR_EXP = 16; - static final int BG_COLOR_EXP = 40; + static final int FG_COLOR_EXP = 15; + static final int BG_COLOR_EXP = 39; static final long FG_COLOR = 0xFFFFFFL << FG_COLOR_EXP; static final long BG_COLOR = 0xFFFFFFL << BG_COLOR_EXP;