mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
more docs
This commit is contained in:
@@ -16,10 +16,10 @@ The `color` rule sets the text color of a Widget.
|
||||
## CSS
|
||||
|
||||
```sass
|
||||
/* Blue background */
|
||||
/* Blue text */
|
||||
color: blue;
|
||||
|
||||
/* 20% red backround */
|
||||
/* 20% red text */
|
||||
color: red 20%;
|
||||
|
||||
/* RGB color */
|
||||
@@ -31,7 +31,7 @@ color: rgb(100,120,200);
|
||||
You can use the same syntax as CSS, or explicitly set a Color object.
|
||||
|
||||
```python
|
||||
# Set blue background
|
||||
# Set blue text
|
||||
widget.styles.color = "blue"
|
||||
|
||||
from textual.color import Color
|
||||
|
||||
Reference in New Issue
Block a user