|
1 | | -# EasyGradients |
| 1 | +# EasyGradients 🌈 |
2 | 2 |
|
3 | | -hello friends this is my project easygradients u can use it for color text and many things i dont know complex coding but it works nicely. |
| 3 | +Hello friend! I made this library because I love colors in my terminal. It is very easy to use and even a small child can use it. No complex coding here, just simple things that work like magic! |
4 | 4 |
|
5 | | -## how to install |
| 5 | +## How to Install this? |
6 | 6 |
|
7 | | -just type this command: |
| 7 | +Just type this simple command in your black screen (terminal): |
8 | 8 |
|
| 9 | +```bash |
9 | 10 | pip install easygradients |
| 11 | +``` |
10 | 12 |
|
11 | | -## how to use it |
| 13 | +## How to use it? (Examples for you) |
12 | 14 |
|
13 | | -first u import the library like this: |
| 15 | +First you must bring the library in your code: |
14 | 16 |
|
| 17 | +```python |
15 | 18 | import easygradients as eg |
| 19 | +``` |
16 | 20 |
|
17 | | -### gradients |
| 21 | +### 1. Simple Colors |
| 22 | +If you want to make text red or green, just do this: |
18 | 23 |
|
19 | | -u can make text gradient like this very easy: |
| 24 | +```python |
| 25 | +# Use hex code like this |
| 26 | +print(eg.color("I am red color!", "#FF0000")) |
20 | 27 |
|
21 | | -# use rgb codes |
22 | | -print(eg.gradient("hello world", [(255, 0, 0), (0, 0, 255)])) |
| 28 | +# Or use simple numbers (RGB) |
| 29 | +print(eg.color("I am green color!", (0, 255, 0))) |
| 30 | +``` |
23 | 31 |
|
24 | | -# use hex codes |
25 | | -print(eg.gradient("color text", ["#FF0000", "#00FF00", "#0000FF"])) |
| 32 | +### 2. Beautiful Gradients |
| 33 | +Gradient means many colors mixing together. It looks very nice! |
26 | 34 |
|
27 | | -# use 4 colors or more |
28 | | -print(eg.gradient("many colors wow", ["#00d9f5", "#00f5a0", "#ff00ff", "#ffff00"])) |
| 35 | +```python |
| 36 | +# Mix red and blue |
| 37 | +print(eg.gradient("Mixing colors wow!", ["#FF0000", "#0000FF"])) |
29 | 38 |
|
30 | | -# use presets names |
31 | | -print(eg.gradient("sunset view", "sunset")) |
| 39 | +# You can even use many colors |
| 40 | +print(eg.gradient("So many colors!", ["#FF0000", "#FFFF00", "#00FF00", "#0000FF"])) |
| 41 | +``` |
32 | 42 |
|
33 | | -### simple colors |
| 43 | +### 3. Using Presets (Shortcuts) |
| 44 | +I have already made some nice color sets for you. You don't need to find hex codes! |
34 | 45 |
|
35 | | -if u want one color only: |
| 46 | +```python |
| 47 | +print(eg.gradient("Sunset is looking good", "sunset")) |
| 48 | +print(eg.gradient("Ocean is blue", "ocean")) |
| 49 | +print(eg.gradient("I am hacker in matrix", "matrix")) |
| 50 | +``` |
36 | 51 |
|
37 | | -print(eg.color("red text", "#FF0000")) |
| 52 | +### 4. Background Colors |
| 53 | +You can even change the back side of the text: |
38 | 54 |
|
39 | | -### background colors |
| 55 | +```python |
| 56 | +print(eg.bg_color("Black background here", "#000000")) |
| 57 | +print(eg.bg_gradient("Gradient background is crazy!", ["#FF5F6D", "#FFC371"])) |
| 58 | +``` |
40 | 59 |
|
41 | | -change backgroud color also: |
| 60 | +### 5. Styling Text |
| 61 | +Make it bold or italic or draw line under it: |
42 | 62 |
|
43 | | -print(eg.bg_color("black bg", "#000000")) |
44 | | -print(eg.bg_gradient("gradient bg", ["#0000FF", "#00FFFF"])) |
| 63 | +```python |
| 64 | +print(eg.style("I am very BOLD", "bold")) |
| 65 | +print(eg.style("I am leaning (italic)", "italic")) |
| 66 | +print(eg.style("Line under me", "underline")) |
| 67 | +``` |
45 | 68 |
|
46 | | -### styles |
| 69 | +### 6. Special Tricks |
| 70 | +Some more things I added because I was bored: |
47 | 71 |
|
48 | | -make text bold or italic: |
| 72 | +```python |
| 73 | +# Rainbow! |
| 74 | +print(eg.rainbow("FULL RAINBOW TEXT!!!")) |
49 | 75 |
|
50 | | -print(eg.style("bold text", "bold")) |
51 | | -print(eg.style("italic text", "italic")) |
| 76 | +# Type like a movie hacker |
| 77 | +eg.typewriter("System is hacking now... please wait...") |
52 | 78 |
|
53 | | -styles available: bold, italic, underline, blink, etc. |
| 79 | +# Put text in the middle |
| 80 | +print(eg.center("I am sitting in the middle")) |
54 | 81 |
|
55 | | -### special things |
| 82 | +# Put text inside a box |
| 83 | +print(eg.box("Special Message for you", border_col="gold")) |
| 84 | +``` |
56 | 85 |
|
57 | | -# rainbow text |
58 | | -print(eg.rainbow("rainbow text wow")) |
| 86 | +### 7. Random (If you are lazy) |
| 87 | +If you can't choose color, let the computer choose: |
59 | 88 |
|
60 | | -# type writer effect |
61 | | -eg.typewriter("typing slowly like hacker...") |
| 89 | +```python |
| 90 | +# Computer will pick anything! |
| 91 | +my_luck = eg.random(show_info=True) |
| 92 | +print(eg.gradient("I don't know what color this is!", my_luck)) |
62 | 93 |
|
63 | | -# center text |
64 | | -print(eg.center("middle of screen")) |
| 94 | +# Ask for random preset only |
| 95 | +preset_luck = eg.random(what_you_want='preset', show_info=True) |
| 96 | +print(eg.gradient("Random preset used!", preset_luck)) |
| 97 | +``` |
65 | 98 |
|
66 | | -# box text |
67 | | -print(eg.box("text in box")) |
| 99 | +## All my Presets: |
| 100 | +`rainbow`, `sunset`, `ocean`, `morning`, `matrix`, `fire`, `night`, `candy`, `neon`, `cool`, `hot`, `simple`, `grass`, `sky`, `blood`, `gold`. |
68 | 101 |
|
69 | | -### random |
| 102 | +## License |
| 103 | +It is MIT license. You can use it anywhere you want, I don't care! Just enjoy the colors. |
70 | 104 |
|
71 | | -if u lazy use random: |
72 | | - |
73 | | -# random style |
74 | | -print(eg.random()) |
75 | | - |
76 | | -# random preset |
77 | | -print(eg.random('preset')) |
78 | | - |
79 | | -## presets list |
80 | | - |
81 | | -we have many presets like: |
82 | | -rainbow, sunset, ocean, fire, matrix, night, neon, cool, hot, simple, gold... |
83 | | - |
84 | | -## license |
85 | | - |
86 | | -mit license free for use enjoy. |
| 105 | +Made with love by DraxonV1. |
0 commit comments