Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change Text Color #162

Open
Motasem-E opened this issue May 10, 2024 · 1 comment
Open

How to change Text Color #162

Motasem-E opened this issue May 10, 2024 · 1 comment

Comments

@Motasem-E
Copy link

Hi, I was able to change the colour of the progress bar, but not the text itself. Is there any way to do that?
I'm using this setup:

ProgressBarBuilder pbb = ProgressBar.builder()
.setStyle(ProgressBarStyle.builder()
.colorCode((byte) 32) // the ANSI color code
.block('█')
.rightBracket("]")
.leftBracket("[")
.space(' ')
.build()
).showSpeed(new DecimalFormat("#.##"))
.setInitialMax(max)
.setTaskName(name)
.continuousUpdate()
.setUnit("req", 1);

this.progressBar = pbb.build();

Thanks in advance!

@ctongfei
Copy link
Owner

Thanks! Right now the color code only controls the drawing part, not the text. You are welcome to create a PR to solve this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants