Skip to content

Commit d167260

Browse files
committed
i made it crazy and humanist now enjoy 🌈
1 parent b463e4b commit d167260

9 files changed

Lines changed: 285 additions & 221 deletions

File tree

.github/workflows/publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Put my code on PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build-and-put:
10+
name: Build the package and send to PyPI
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Get Python ready
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.x"
18+
- name: Install the builder tool
19+
run: >-
20+
python -m
21+
pip install
22+
build
23+
--user
24+
- name: Make the files for distribution
25+
run: >-
26+
python -m
27+
build
28+
--sdist
29+
--wheel
30+
--outdir dist/
31+
- name: Send everything to PyPI
32+
uses: pypa/gh-action-pypi-publish@release/v1
33+
with:
34+
password: ${{ secrets.PYPI_TOKEN }}

README.md

Lines changed: 73 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,105 @@
1-
# EasyGradients
1+
# EasyGradients 🌈
22

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!
44

5-
## how to install
5+
## How to Install this?
66

7-
just type this command:
7+
Just type this simple command in your black screen (terminal):
88

9+
```bash
910
pip install easygradients
11+
```
1012

11-
## how to use it
13+
## How to use it? (Examples for you)
1214

13-
first u import the library like this:
15+
First you must bring the library in your code:
1416

17+
```python
1518
import easygradients as eg
19+
```
1620

17-
### gradients
21+
### 1. Simple Colors
22+
If you want to make text red or green, just do this:
1823

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"))
2027

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+
```
2331

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!
2634

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"]))
2938

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+
```
3242

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!
3445

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+
```
3651

37-
print(eg.color("red text", "#FF0000"))
52+
### 4. Background Colors
53+
You can even change the back side of the text:
3854

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+
```
4059

41-
change backgroud color also:
60+
### 5. Styling Text
61+
Make it bold or italic or draw line under it:
4262

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+
```
4568

46-
### styles
69+
### 6. Special Tricks
70+
Some more things I added because I was bored:
4771

48-
make text bold or italic:
72+
```python
73+
# Rainbow!
74+
print(eg.rainbow("FULL RAINBOW TEXT!!!"))
4975

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...")
5278

53-
styles available: bold, italic, underline, blink, etc.
79+
# Put text in the middle
80+
print(eg.center("I am sitting in the middle"))
5481

55-
### special things
82+
# Put text inside a box
83+
print(eg.box("Special Message for you", border_col="gold"))
84+
```
5685

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:
5988

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))
6293

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+
```
6598

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`.
68101

69-
### random
102+
## License
103+
It is MIT license. You can use it anywhere you want, I don't care! Just enjoy the colors.
70104

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.

easygradients/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
__version__ = "0.1.0"
2+
13
from .core import color, gradient, random, style, bg_color, bg_gradient, rainbow, typewriter, center, box
24
from .presets import gradients

0 commit comments

Comments
 (0)