# Changing the color of scroll bars

**URL:** <https://krita-artists.org/t/changing-the-color-of-scroll-bars/89060>\
**Category:** General Questions\
**Tags:** how-to-use\
**Created:** [April 12, 2024, 4:59pm UTC](https://krita-artists.org/t/changing-the-color-of-scroll-bars/89060 "2024-04-12T16:59:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![freyalupen](https://krita-artists.org/user_avatar/krita-artists.org/freyalupen/32/47913_2.png) [@freyalupen](https://krita-artists.org/u/freyalupen)\
**Post date:** [April 12, 2024, 5:54pm UTC](https://krita-artists.org/t/changing-the-color-of-scroll-bars/89060/2 "2024-04-12T17:54:50Z")

</div>

You can test with this code in Tools-\>Scripts-\>Scripter:

```python
from krita import *

stylesheet = \
"""
QScrollBar {
    background: #00ff00;
}
QScrollBar::handle {
    background: #0000ff;
}
"""

qApp.setStyleSheet(stylesheet)

```

It should make all of Krita’s scrollbars’ backgrounds green, and handles blue.  
Note that according to Qt’s docs, all properties must be set, so you can’t only have the “handle” part or it won’t work. See [Qt Style Sheets Examples | Qt Widgets 5.15.16](https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qscrollbar) for more info and examples.

You can tweak the colors, then save the style sheet as a text file and use my [Style Sheet Loader Extension](https://krita-artists.org/t/plugin-style-sheet-loader-extension/62955/) to have it load automatically on startup.

---

_[View the full topic](https://krita-artists.org/t/changing-the-color-of-scroll-bars/89060)._
