A script to rotate the hue of a Forgejo theme
- Python 67.4%
- CSS 32.6%
| gitea-auto-green.css | ||
| main.py | ||
| pyproject.toml | ||
| README.org | ||
Just rotate your favorite color theme for forgejo
How to use it?
-
First, find your CSS theme that you want as a base:
- If it's a default Forgejo theme on your instance, go to:
example: https://<instance>/assets/css/theme-gitea-auto.css
- Get all the theme files and format them (easier for the next step)
-
Identify the color that you want:
- Usually all the –color-primary<-…>
- Copy it into a big string
- Put the string
main.pyinto the file under nameMYSTR - Adjust the rotation angle
ROTATION_ANGLE - Run the script
-
Paste the results while importing the base CSS theme used
- See example in
gitea-auto-green.css
- See example in
Roadmap [0/4]
By order of priority
-
Fetch directly the CSS theme from the URL and parse json
- Just adjust –color-primary
- Resolve var? (just ignore)
-
Auto-generate resulting css
- Import the base theme if available on the instance.
- If not available on the base instance, just regenerate the whole CSS.
- Script to rotate favicon and logo svg?
- Hook to regenerate theme on Forgejo update?