python - pyqtgraph histogram LUT Item - how to change color? -


i want change color of blue bar in histogram.

i've changed color of background:

.ui.histogram.setbackground(background= pg.mkcolor(37,37,37)) 

but don´t know how change color of blue bar. (i imported pyqtgraph pg)

does know how this?

thank in advance

it's hard me make answer i'm of, because don't have information. instance ui in question? next time please make mvce.

anyway, assuming have imageview object called imgview following should work:

alpha = 50 region = imgview.histogram.item.region region.setbrush(color=(255, 0, 0, alpha)) line in region.lines:     line.setpen(color=(255, 0, 0, 255)) 

make sure alpha smaller 128. value of 2 * alpha used when hover above region, , warning if exceeds 256.

by way, imgview.histogram.item histogramlutitem. got answer looking @ source code.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -