Textualize/textual

Colour background of widget not rendering correctly

Closed this issue · 1 comments

Hi there,

I've set the background colour of a widget to this hex code: #18375f

However, to my eye, the colour being rendered is different:

image

Here is the Python and CSS code:

from textual.app import App
from textual.widgets import Label


class ColorApp(App):
    CSS_PATH = "colour.tcss"

    def compose(self):
        yield Label("The quick brown fox jumps over the lazy dog!", id="lbl1")


if __name__ == "__main__":
    app = ColorApp()
    app.run()
Label {
    color: auto 80%;
    content-align: center middle;
    height: 1fr;
    width: 100%;
}

#lbl1 {
    background: #18375f
}

Other colours I've tested are rendering correctly.

Thanks!

We found the following entries in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory