Color of ProgressBar

Hi.

how can i change the color of a progressbar?

ProgressBar progressBar = new ProgressBar(0.5f);
progressBar.setStyleName("myprogressbar");

and adding .myprogressbar { background-color: #2c9020; } in the
styles.css
doesn´t do the job.

Thank you,
Boris

Hi Boris,
if you are extending valo theme you can use this snippet in your scss (after valo mixin inclusion)

$v-selection-color: #2c9020; @include valo-progressbar(myprogressbar); and then in your java code

ProgressBar progressBar = new ProgressBar(0.5f); progressBar.setPrimaryStyleName("myprogressbar"); Otherwise, if you want a pure css solution you can use the following rule with your original java code

.v-progressbar.myprogressbar .v-progressbar-indicator { background-color: #2c9020; background-image: -webkit-linear-gradient(top, #2f9822 2%, #26811b 98%); background-image: linear-gradient(to bottom,#2f9822 2%, #26811b 98%); border-color: #227119; } HTH
Marco

YES!! Thank you.