GithubHelp home page GithubHelp logo

Comments (7)

dialex avatar dialex commented on June 6, 2024

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.

fizaan avatar fizaan commented on June 6, 2024

No problem! Take your time 👍

from jcolor.

dialex avatar dialex commented on June 6, 2024

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.

Screenshot 2020-11-29 at 19 48 45

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.

fizaan avatar fizaan commented on June 6, 2024

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.

dialex avatar dialex commented on June 6, 2024

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 (without mvn)?
  • 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.

fizaan avatar fizaan commented on June 6, 2024

Here some more output:

  1. dos command line
    image

  2. power shell:
    image

  3. 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.

dialex avatar dialex commented on June 6, 2024
  1. I checked your Windows 10 build and 14393 is fairly old, from 2016. I'm running 19041, from 2020. Not sure that makes any difference, and it would be a big change for you, so let's ignore that.
  2. Even PowerShell fails to show color... so it's unlikely a Windows issue. The remaining suspects are Maven and JColor.
  3. Yes, please try it but take your time.

from jcolor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.