Comments (7)
Thanks for reporting it. I have limited time now, but I soon as I have a break I'll try to reproduce it.
from jcolor.
No problem! Take your time
from jcolor.
Thank you for waiting. I tried to reproduce your issue using the code you showed in your screenshot:
Thread.currentThread();
Random _rand = new Random();
System.out.println(colorize("This text will be yellow on red", BRIGHT_YELLOW_TEXT(), RED_BACK()));
System.out.println("\n");
System.out.println("Use Case 7 - Any TrueColor (RGB), as long as your terminal supports it:");
for (int i = 0; i < 5; i++) {
Attribute bgCol = BACK_COLOR(
_rand.nextInt(255), _rand.nextInt(255), _rand.nextInt(255));
System.out.println(colorize("Test: " + i, bgCol));
}
System.out.println("\n");
Your code is actually very similar to "use case 7" of my documentation, so it's a scenario I tested before releasing the TrueColors feature.
I ran it inside IntelliJ CE and as you can see from my screenshot, the terminal displayed the background with TrueColor (8-bit) colours.
Mind that for TrueColors to be displayed your terminal needs to support it. Which terminal did you use?
I'm not sure if Windows Command Prompt (cmd.exe) supports TrueColors. I saw this update but it's about "Windows Console". When they say "Console" are they referring to "Windows Command Prompt" or their new shiny "Windows Terminal"?
Can you please try to run your code on PowerShell? Or Windows Terminal?
from jcolor.
Hi!
Yes I ran the code on Windows cmd console as well as the power shell console window and the background was not getting highlighted in both cases. Maybe this is a windows limitation as you pointed out. Unfortunately I want to run my code on the console only for now (as opposed to some IDE console like eclipse or IntelliJ so. Thanks for your support!
from jcolor.
Oh bummer
Before we give up, let's try one to figure out what's the cause of the issue:
- What is the Windows 10 build you're using?
- From your output screenshot format, I assume you are running your app with Maven. Could you try generate a jar of your app, and then use
java
to run it directly (withoutmvn
)? - Just for sanity sake, could you import your code to an IDE (i.e. IntelliJ), run your code there and check the IDE's terminal output?
from jcolor.
Here some more output:
-
Eclipse IDE (cannot run from IDE as it required some parameters to be set in the environment which I am too lazy to do right now. I can do it later if necessary. Thanks!
from jcolor.
- I checked your Windows 10 build and
14393
is fairly old, from 2016. I'm running19041
, from 2020. Not sure that makes any difference, and it would be a big change for you, so let's ignore that. - Even PowerShell fails to show color... so it's unlikely a Windows issue. The remaining suspects are Maven and JColor.
- Yes, please try it but take your time.
from jcolor.
Related Issues (20)
- Refactor: foreground and background words
- Which escape code to use?
- Test: convert acceptance test to snapshot test HOT 2
- Feature: allow dev to display color without printers HOT 1
- Fix "ghost formatting" on background
- Address all warnings in the code HOT 1
- Debugging Output in Eclipse IDE Does not format the markup HOT 1
- Probably Trailing new lines not supported/Line Break Issue HOT 4
- Colors don't work in Windows 10 command prompt + powershell HOT 2
- First word not printed properly HOT 2
- Feature: Support of clear screen HOT 4
- Import in java program HOT 2
- Windows Command Line and Powershell display ANSI escape codes instead of expected formatting HOT 8
- README.md code samples are confusing HOT 1
- Simple formatter like Color.format("text") with BB Codes or Markdown Syntax? HOT 3
- feature request: remove the jna dependency HOT 1
- bug report: CLEAR_SCREEN is not portable HOT 4
- Doesn't work on command prompt HOT 3
- Since v5.3.1 compile time dependencies include all maven-bundle-plugin dependencies HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jcolor.