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

php - Cannot override Laravel Spark authentication with own implementation -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -