Skip to content

Commit

Permalink
fixed: Text class docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Almas-Ali committed Mar 11, 2024
1 parent ef61f21 commit 1b34f99
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,15 +326,17 @@ print(f"This is a {Highlight.bgreen('bold green')} text")

Most powerfull class in this module is `rong.Text`. It is used to create a text object with different styles and colors. It has the following methods to create a text object.

- To add forground / text color `foreground(color:str)`
- `foreground(color: ForegroundColor) -> Text`

- To add backgroung color `background(color:str)`
- `background(color: BackgroundColor) -> Text`

- To add styles as list `style(styles:list)`
- `style(styles: List[Style]) -> str`

- To update object text `update(text:str):`
- `update(text: str) -> Text`

- To show output text `print()`
- `print() -> None`

You can dynamically add colors and styles to the text object with this methods. It is also possible to update the text of the object. You can print the output with `print` method. Normal `print(text)` also works same as `text.print()`.

### Text Example

Expand Down

0 comments on commit 1b34f99

Please sign in to comment.