├── .github └── workflows │ ├── codeql-analysis.yml │ └── python-package.yml ├── .gitignore ├── COLORS.md ├── LICENSE ├── MANIFEST.in ├── README.md ├── api ├── app │ ├── __init__.py │ ├── models.py │ └── routes │ │ ├── __init__.py │ │ ├── index.py │ │ ├── themes.py │ │ └── users.py └── runner.py ├── bin ├── boot ├── clean ├── dist └── local ├── docs ├── Docs.md ├── README.md ├── Themes.md ├── Tokens.yaml ├── theme.md └── values.md ├── reflux ├── __init__.py ├── engine │ ├── reflux.js │ ├── reflux.min.js │ ├── theme.js │ └── theme.min.js ├── errors.py ├── resources.py ├── theme.py └── variables │ ├── dark.txt │ ├── light.txt │ └── root.txt ├── setup.py └── themes ├── blueberry ├── blueberry.png ├── theme.min.js └── theme.py ├── cactus ├── cactus.png ├── theme.min.js └── theme.py ├── candyland ├── candyland.png ├── theme.min.js └── theme.py ├── iris-flower ├── iris-flower.png ├── theme.min.js └── theme.py └── jett-black ├── jett-black.png ├── theme.min.js └── theme.py /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL" 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | pull_request: 7 | branches: [master] 8 | schedule: 9 | - cron: '0 14 * * 3' 10 | 11 | jobs: 12 | analyze: 13 | name: Analyze 14 | runs-on: ubuntu-latest 15 | 16 | strategy: 17 | fail-fast: false 18 | matrix: 19 | language: ['python'] 20 | steps: 21 | - name: Checkout repository 22 | uses: actions/checkout@v2 23 | with: 24 | fetch-depth: 2 25 | 26 | - run: git checkout HEAD^2 27 | if: ${{ github.event_name == 'pull_request' }} 28 | 29 | - name: Initialize CodeQL 30 | uses: github/codeql-action/init@v1 31 | with: 32 | languages: ${{ matrix.language }} 33 | 34 | - name: Autobuild 35 | uses: github/codeql-action/autobuild@v1 36 | 37 | - name: Perform CodeQL Analysis 38 | uses: github/codeql-action/analyze@v1 39 | -------------------------------------------------------------------------------- /.github/workflows/python-package.yml: -------------------------------------------------------------------------------- 1 | name: Python package 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | strategy: 14 | matrix: 15 | python-version: [3.7, 3.8, 3.9] 16 | 17 | steps: 18 | - uses: actions/checkout@v2 19 | - name: Set up Python ${{ matrix.python-version }} 20 | uses: actions/setup-python@v2 21 | with: 22 | python-version: ${{ matrix.python-version }} 23 | - name: Install dependencies 24 | run: | 25 | python3 -m pip install --upgrade pip 26 | pip install flake8 pytest 27 | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi 28 | - name: Lint with flake8 29 | run: | 30 | flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics 31 | flake8 . --count --exit-zero --max-complexity=10 --max-line-length=90 --statistics 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # PYTHON FILES 2 | # ------------ 3 | dist/ 4 | build/ 5 | *.egg.info/ 6 | __pycache__/ 7 | _*/ 8 | 9 | # ENVIRON FILES 10 | # ------------ 11 | main.py 12 | .env 13 | .replit 14 | env/ 15 | venv/ 16 | node_modules/ 17 | package-lock.json -------------------------------------------------------------------------------- /COLORS.md: -------------------------------------------------------------------------------- 1 | ### Light Theme Colors 2 | 3 | Default color values for light layouts: 4 | 5 | ```css 6 | .replit-ui-theme-root.light { 7 | --color-background-1: #ffffff; 8 | --color-background-2: #f6f6f6; 9 | --color-background-3: #eeeeee; 10 | --color-control-1: #e0e0e0; 11 | --color-control-2: #e9e9e9; 12 | --color-control-3: #f3f3f3; 13 | --color-border: #e0e0e0; 14 | --color-foreground-1: #363636; 15 | --color-foreground-2: #6f6f6f; 16 | --color-foreground-3: #949494; 17 | --color-foreground-4: #b7b7b7; 18 | --color-foreground-transparent-1: rgba(255, 255, 255, 0.48); 19 | --color-foreground-transparent-2: rgba(255, 255, 255, 0.24); 20 | --color-foreground-transparent-3: rgba(255, 255, 255, 0.12); 21 | --color-primary-1: #3485e4; 22 | --color-primary-2: #337ad1; 23 | --color-primary-3: #3272c2; 24 | --color-primary-4: #316ab4; 25 | --color-primary-transparent-1: rgba(52, 133, 228, 0.48); 26 | --color-primary-transparent-2: rgba(52, 133, 228, 0.24); 27 | --color-primary-transparent-3: rgba(52, 133, 228, 0.12); 28 | --color-negative-1: #ff491c; 29 | --color-negative-2: #e9441b; 30 | --color-negative-3: #d8411b; 31 | --color-negative-4: #c93d1a; 32 | --color-negative-transparent-1: rgba(255, 73, 28, 0.48); 33 | --color-negative-transparent-2: rgba(255, 73, 28, 0.24); 34 | --color-negative-transparent-3: rgba(255, 73, 28, 0.12); 35 | --color-warning-1: #eb6404; 36 | --color-warning-2: #d65c08; 37 | --color-warning-3: #c7560b; 38 | --color-warning-4: #b8510d; 39 | --color-warning-transparent-1: rgba(242, 103, 2, 0.48); 40 | --color-warning-transparent-2: rgba(242, 103, 2, 0.24); 41 | --color-warning-transparent-3: rgba(242, 103, 2, 0.12); 42 | --color-positive-1: #21a243; 43 | --color-positive-2: #21953e; 44 | --color-positive-3: #228a3a; 45 | --color-positive-4: #228037; 46 | --color-positive-transparent-1: rgba(24, 204, 81, 0.48); 47 | --color-positive-transparent-2: rgba(24, 204, 81, 0.24); 48 | --color-positive-transparent-3: rgba(24, 204, 81, 0.12); 49 | } 50 | ``` 51 | 52 | ### Dark Theme Colors 53 | 54 | Default color values for dark layouts: 55 | ```css 56 | .replit-ui-theme-root.dark { 57 | --color-background-1: #1d2333; 58 | --color-background-2: #171d2d; 59 | --color-background-3: #0e1525; 60 | --color-control-1: #313646; 61 | --color-control-2: #2b3140; 62 | --color-control-3: #262b3b; 63 | --color-border: #313646; 64 | --color-foreground-1: #e1e2e4; 65 | --color-foreground-2: #90939c; 66 | --color-foreground-3: #696d78; 67 | --color-foreground-4: #4e525f; 68 | --color-foreground-transparent-1: rgba(14, 21, 37, 0.48); 69 | --color-foreground-transparent-2: rgba(14, 21, 37, 0.24); 70 | --color-foreground-transparent-3: rgba(14, 21, 37, 0.12); 71 | --color-primary-1: #3485e4; 72 | --color-primary-2: #337bd2; 73 | --color-primary-3: #3273c4; 74 | --color-primary-4: #316cb8; 75 | --color-primary-transparent-1: rgba(52, 133, 228, 0.48); 76 | --color-primary-transparent-2: rgba(52, 133, 228, 0.24); 77 | --color-primary-transparent-3: rgba(52, 133, 228, 0.12); 78 | --color-negative-1: #ff491c; 79 | --color-negative-2: #eb451b; 80 | --color-negative-3: #db411b; 81 | --color-negative-4: #cd3e1a; 82 | --color-negative-transparent-1: rgba(255, 73, 28, 0.48); 83 | --color-negative-transparent-2: rgba(255, 73, 28, 0.24); 84 | --color-negative-transparent-3: rgba(255, 73, 28, 0.12); 85 | --color-warning-1: #f26702; 86 | --color-warning-2: #de5f07; 87 | --color-warning-3: #ce590a; 88 | --color-warning-4: #c0540c; 89 | --color-warning-transparent-1: rgba(242, 103, 2, 0.48); 90 | --color-warning-transparent-2: rgba(242, 103, 2, 0.24); 91 | --color-warning-transparent-3: rgba(242, 103, 2, 0.12); 92 | --color-positive-1: #20ab46; 93 | --color-positive-2: #219d41; 94 | --color-positive-3: #22923d; 95 | --color-positive-4: #22883a; 96 | --color-positive-transparent-1: rgba(24, 204, 81, 0.48); 97 | --color-positive-transparent-2: rgba(24, 204, 81, 0.24); 98 | --color-positive-transparent-3: rgba(24, 204, 81, 0.12); 99 | } 100 | ``` 101 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Frissyn 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include reflux/engine/theme.js 2 | include reflux/engine/reflux.js 3 | include reflux/engine/theme.min.js 4 | include reflux/engine/reflux.min.js 5 | 6 | include reflux/variables/dark.txt 7 | include reflux/variables/root.txt 8 | include reflux/variables/light.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Reflux 2 | 3 | ### NOTICE! ⚠️ 4 | #### Replit officialy supports themes now! The team reached out to the developers of this project for feedback, and after... a long hiatus of communication, the Replit team has created a native theme creator and publisher. 5 | #### This project will be archived until further notice, thanks for checking out Reflux! 6 | 7 | ___ 8 | 9 | Reflux is a third-party tool for creating and publishing site-wide style themes to Replit! Using Reflux, users can easily change Replit's default CSS variables, and share thier created themes with other users via the [marketplace](https://market.reflux.repl.co/). Find the quickstart example [here](https://replit.com/@reflux/template). Fork it and follow the guide to get started using Reflux and creating themes on Replit! 10 | 11 | ### Showcase 12 | 13 | ![image](https://storage.googleapis.com/replit/images/1635881358588_fb0b7e55745d4ffcdfce7ec2f5c33fd7.png) 14 | 15 | ![image](https://storage.googleapis.com/replit/images/1635881352143_96390d7d5b4809e8ef1f83a9e2bf8355.png) 16 | 17 | ### Installation 18 | 19 | |Manager |Command | 20 | |:----------------|:---------------------------------------------| 21 | |**pip** |`pip install reflux` | 22 | |**poetry** |`poetry add reflux` | 23 | |**replit** |Search `reflux` in the Packages tab and `+` it| 24 | 25 | ### Documentation 26 | 27 | Find extensive documentation on Reflux and it uses [here](https://github.com/frissyn/Reflux/tree/master/docs). 28 | 29 | ### Contributing 30 | 31 | 1. Fork the repository: [`Fork`](https://github.com/frissyn/Reflux/fork) 32 | 2. Clone locally (`git clone https://github.com//Reflux.git`) 33 | 3. Create your feature branch (`git checkout -b my-new-feature`) 34 | 4. Commit your changes (`git commit -a -m 'Add some feature'`) 35 | 5. Push to the branch (`git push origin my-new-feature`) 36 | 6. Create a new Pull Request! 🎉 37 | 38 | **Local Developement:** 39 | 40 | In order to properly test the Reflux package locally run `bash bin/local` in the project directory. `bash bin/clean` will delete the tarball and build directories. 41 | -------------------------------------------------------------------------------- /api/app/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | import flask 3 | import secrets 4 | import repltalk 5 | import psycopg2 6 | 7 | from flask_migrate import Migrate 8 | from flask_sqlalchemy import SQLAlchemy 9 | 10 | app = flask.Flask(__name__) 11 | replit = repltalk.Client() 12 | app.config.from_mapping({ 13 | "DEBUG": False, 14 | "TESTING": False, 15 | "FLASK_DEBUG": 0, 16 | "CACHE_TYPE": "simple", 17 | "CACHE_DEFAULT_TIMEOUT": 300, 18 | "SECRET_KEY": secrets.token_hex(16), 19 | "SQLALCHEMY_DATABASE_URI": os.environ["DATABASE_URL"], 20 | "SQLALCHEMY_TRACK_MODIFICATIONS": False 21 | }) 22 | 23 | conn = psycopg2.connect(os.environ["DATABASE_URL"], sslmode="require") 24 | 25 | @app.after_request 26 | def apply_caching(response): 27 | response.headers["Access-Control-Allow-Origin"] = "*" 28 | 29 | return response 30 | 31 | tokens = [os.getenv("TOKEN")] 32 | db = SQLAlchemy(app) 33 | migrator = Migrate(app, db) 34 | 35 | from .routes import * -------------------------------------------------------------------------------- /api/app/models.py: -------------------------------------------------------------------------------- 1 | import locale 2 | 3 | from app import db 4 | 5 | from datetime import datetime as dt 6 | 7 | from sqlalchemy.inspection import inspect 8 | 9 | locale.setlocale(locale.LC_ALL, "") 10 | 11 | 12 | class User(db.Model): 13 | id = db.Column(db.Integer, primary_key=True) 14 | avatar = db.Column(db.String, nullable=False) 15 | name = db.Column(db.String(64), nullable=False) 16 | description = db.Column(db.String, nullable=False) 17 | publish_key = db.Column(db.String(32), nullable=False, unique=True) 18 | admin = db.Column(db.Boolean, nullable=False, default=False) 19 | timestamp = db.Column(db.DateTime, default=dt.utcnow(), nullable=False) 20 | themes = db.relationship( 21 | "Theme", lazy=True, backref=db.backref("author", lazy=True) 22 | ) 23 | 24 | def cereal(self, admin=False): 25 | result = {c: getattr(self, c) for c in inspect(self).attrs.keys()} 26 | result["themes"] = [t.cereal(partial=True) for t in result["themes"]] 27 | 28 | if not admin: 29 | result.pop("admin") 30 | result.pop("publish_key") 31 | 32 | return result 33 | 34 | def __repr__(self): 35 | return f"" 36 | 37 | 38 | class Theme(db.Model): 39 | id = db.Column(db.Integer, primary_key=True) 40 | name = db.Column(db.String, nullable=False) 41 | stylesheet = db.Column(db.Text, nullable=False) 42 | referral = db.Column(db.String(16), nullable=False, unique=True) 43 | downloads = db.Column(db.Integer, nullable=False, default=0) 44 | description = db.Column(db.String, nullable=False, default="") 45 | author_id = db.Column(db.Integer, db.ForeignKey("user.id")) 46 | 47 | def cereal(self, admin=False, partial=False): 48 | result = {c: getattr(self, c) for c in inspect(self).attrs.keys()} 49 | result["f_downloads"] = locale.format("%d", self.downloads, grouping=True) 50 | 51 | if partial: 52 | result.pop("author") 53 | else: 54 | a = self.author 55 | author = {c.name: getattr(a, c.name) for c in a.__table__.columns} 56 | 57 | result["author"] = author 58 | result.pop("author_id") 59 | 60 | if not admin: 61 | result["author"].pop("admin") 62 | result["author"].pop("publish_key") 63 | 64 | main_bg = self.stylesheet.split("--background-default: ")[1].split(" !important;")[0] 65 | if "monaco" not in result: 66 | result["monaco"] = main_bg 67 | 68 | if "xterm" not in result: 69 | result["xterm"] = main_bg 70 | 71 | return result 72 | 73 | def __repr__(self): 74 | return f"" 75 | -------------------------------------------------------------------------------- /api/app/routes/__init__.py: -------------------------------------------------------------------------------- 1 | import glob 2 | 3 | from os.path import join 4 | from os.path import isfile 5 | from os.path import dirname 6 | from os.path import basename 7 | 8 | 9 | __all__ = [] 10 | modules = glob.glob(join(dirname(__file__), "*.py")) 11 | 12 | for m in modules: 13 | flag1 = isfile(m) 14 | flag2 = m.endswith("__init__.py") 15 | 16 | if flag1 and not flag2: 17 | __all__.append(basename(m)[:-3]) -------------------------------------------------------------------------------- /api/app/routes/index.py: -------------------------------------------------------------------------------- 1 | import flask 2 | 3 | from app import app 4 | 5 | @app.route("/") 6 | def index_route(): 7 | return flask.jsonify({"status": 200}) -------------------------------------------------------------------------------- /api/app/routes/themes.py: -------------------------------------------------------------------------------- 1 | import os 2 | import flask 3 | import secrets 4 | 5 | from app import db 6 | from app import app 7 | 8 | from json import JSONDecodeError, loads 9 | 10 | from ..models import User 11 | from ..models import Theme 12 | 13 | 14 | def unlock(req): 15 | return req.headers.get("PSWD").strip() == os.environ["PSWD"] 16 | 17 | 18 | def lite(themes, req): 19 | if req.args.get("lite") in ["True", "true", "1", 1]: 20 | for t in themes: 21 | t.pop("stylesheet") 22 | 23 | return themes 24 | 25 | 26 | @app.route("/theme/all", methods=["GET"]) 27 | def get_all_themes(): 28 | themes = Theme.query.all() 29 | themes = [t.cereal() for t in themes] 30 | 31 | return flask.jsonify(lite(themes, flask.request)) 32 | 33 | 34 | @app.route("/theme/feed/popular", methods=["GET"]) 35 | def get_popular_themes(): 36 | floor = flask.request.args.get("floor") 37 | floor = int(floor) if floor else 10 38 | 39 | themes = Theme.query.filter(Theme.downloads >= floor).order_by(Theme.downloads.desc()) 40 | themes = [t.cereal() for t in themes] 41 | 42 | return flask.jsonify(lite(themes, flask.request)) 43 | 44 | 45 | @app.route("/theme/feed/recent", methods=["GET"]) 46 | def get_recent_themes(): 47 | limit = flask.request.args.get("limit") 48 | limit = int(limit) if limit else 60 49 | 50 | themes = Theme.query.filter().order_by(Theme.id.desc()) 51 | themes = [t.cereal() for t in themes] 52 | 53 | return flask.jsonify(lite(themes, flask.request)) 54 | 55 | 56 | @app.route("/theme/", methods=["GET"]) 57 | def get_theme(tcode: str): 58 | theme = Theme.query.filter_by(referral=tcode).first() 59 | 60 | if not theme: 61 | return flask.abort(404) 62 | 63 | theme.downloads += 1 64 | db.session.commit() 65 | 66 | return flask.jsonify(theme.cereal()) 67 | 68 | 69 | @app.route("/style/", methods=["GET"]) 70 | def get_styles(tcode: str): 71 | theme = Theme.query.filter_by(referral=tcode).first() 72 | 73 | if not theme: 74 | return flask.abort(404) 75 | else: 76 | theme.downloads += 1 77 | 78 | return flask.jsonify(theme.stylesheet) 79 | 80 | 81 | @app.route("/theme/delete/", methods=["DELETE"]) 82 | def delete_theme(tcode: str): 83 | if not unlock(flask.request): return flask.abort(403) 84 | 85 | theme = Theme.query.filter_by(referral=tcode).first() 86 | 87 | if not theme: return flask.abort(404) 88 | 89 | db.session.delete(theme) 90 | db.session.commit() 91 | 92 | return "", 204 93 | 94 | 95 | @app.route("/theme/upload", methods=["POST"]) 96 | def upload_theme(): 97 | try: 98 | body = flask.request.get_json(force=True) 99 | except JSONDecodeError: 100 | return flask.abort(400) 101 | 102 | user = User.query.filter_by(publish_key=body["publish_key"]).first() 103 | if not user: return flask.abort(401) 104 | 105 | theme = None 106 | themes = Theme.query.with_parent(user) 107 | 108 | for t in themes: 109 | if t.name.lower() == body["name"].lower(): 110 | theme = t 111 | 112 | if not theme: 113 | theme = Theme() 114 | tok = secrets.token_hex(8) 115 | 116 | while Theme.query.filter_by(referral=tok).first(): 117 | tok = secrets.token_hex(8) 118 | 119 | theme.referral = tok 120 | 121 | theme.name = body["name"] 122 | theme.description = body["description"] 123 | theme.stylesheet = body["stylesheet"] 124 | theme.author_id = user.id 125 | 126 | if "monaco" in body.keys(): 127 | theme.monaco = body["monaco"] 128 | if "xterm" in body.keys(): 129 | theme.xterm = body["xterm"] 130 | 131 | db.session.add(theme) 132 | db.session.commit() 133 | 134 | return flask.jsonify(theme.cereal()) 135 | -------------------------------------------------------------------------------- /api/app/routes/users.py: -------------------------------------------------------------------------------- 1 | import os 2 | import flask 3 | import secrets 4 | import asyncio 5 | 6 | from app import db 7 | from app import app 8 | from app import replit 9 | 10 | from ..models import User 11 | 12 | 13 | def unlock(req): 14 | return req.headers.get("PSWD") == os.environ["PSWD"] 15 | 16 | 17 | def lite(themes, req): 18 | if req.args.get("lite") in ["True", "true", "1", 1]: 19 | for t in themes: 20 | t.pop("stylesheet") 21 | 22 | return themes 23 | 24 | 25 | @app.route("/user/", methods=["GET"]) 26 | def get_user(uname): 27 | data = asyncio.run(replit.get_user(uname)) 28 | user = User.query.get_or_404(data.id) 29 | 30 | user = user.cereal(admin=unlock(flask.request)) 31 | lite(user["themes"], flask.request) 32 | 33 | return flask.jsonify(user) 34 | 35 | 36 | @app.route("/portal/", methods=["POST"]) 37 | def user_portal(uname: str): 38 | if not unlock(flask.request): return flask.abort(403) 39 | 40 | data = asyncio.run(replit.get_user(uname)) 41 | user = User.query.get(data.id) 42 | 43 | if user is None: 44 | user = User(id=data.id) 45 | tok = secrets.token_urlsafe(16) 46 | 47 | while User.query.filter_by(publish_key=tok).first(): 48 | tok = secrets.token_urlsafe(16) 49 | 50 | user.publish_key = tok 51 | 52 | user.id = data.id 53 | user.name = data.name 54 | user.avatar = data.avatar 55 | user.description = data.bio 56 | user.timestamp = data.timestamp 57 | 58 | db.session.add(user) 59 | db.session.commit() 60 | 61 | return flask.jsonify(user.cereal(admin=True)) -------------------------------------------------------------------------------- /api/runner.py: -------------------------------------------------------------------------------- 1 | from app import db 2 | from app import app 3 | 4 | try: 5 | db.create_all(bind="__all__") 6 | except Exception as e: 7 | print(f"DB Bind Error: {e}") 8 | 9 | app.run(host="0.0.0.0", port=8080, debug=False) -------------------------------------------------------------------------------- /bin/boot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | pip install black 4 | pip install pyyaml 5 | 6 | pip install --upgrade setuptools wheel twine -------------------------------------------------------------------------------- /bin/clean: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | rm -r "dist" 4 | rm -r "build" 5 | rm -r "reflux.egg-info" -------------------------------------------------------------------------------- /bin/dist: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | function propmt_clear() { 4 | echo -n "clear? >> " 5 | read res 6 | 7 | if [ $res == "y" ]; then 8 | clear 9 | fi 10 | } 11 | 12 | echo "Building Distribution..." 13 | python3 setup.py sdist bdist_wheel 14 | propmt_clear 15 | 16 | 17 | echo "Executing Distribution..." 18 | python3 -m twine upload dist/* 19 | propmt_clear 20 | 21 | echo "Done!" -------------------------------------------------------------------------------- /bin/local: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Creating local installation of Reflux..." 4 | pip install -e . 5 | pip show reflux -------------------------------------------------------------------------------- /docs/Docs.md: -------------------------------------------------------------------------------- 1 | # Reflux: Python Documentation 2 | 3 | ### `reflux.Theme` 4 | 5 | Base class for creating, parsing, and uploading Reflux themes. 6 | 7 | |Function|Example|Description| 8 | |:-------|:-----:|:----------| 9 | |`__init__(path)`|`Theme("theme.yaml")`|Parses and creates a theme.| 10 | |`theme.upload(publish_key)`|`theme.upload("gRVxeIYoGGGfHxbM-lKJQw")`|Uploads the theme to Reflux with a user's publish key.| 11 | |`theme.referral`|`theme.referral()`|Returns the theme's referral code. Raises an error if theme has not been uploaded.| 12 | |`theme.to_stylesheet(file=None)`|`theme.to_stylesheet(file="theme.css")`|Generates a CSS stylesheet from the theme and returns the text. Saves to filename if provided.| 13 | 14 | ### `reflux.errors` 15 | 16 | Errors that might be raised when using Reflux. 17 | 18 | |Error|Description| 19 | |:----|:----------| 20 | |`RefluxAPIError`|Raised when an error occurs when interacting with the API.| 21 | |`NotUploadedError`|Raised when calling `theme.referral()` without uploding the theme.| 22 | |`MissingFieldError`|Raised when a field is missing from the theme file.| 23 | |`MissingCategoryError`|Raised when a category is missing from the theme file.| -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Reflux Documentation 2 | 3 | References for the Reflux Web and Programming API. 4 | 5 | + [Using Theme Files 🔗](Themes.md) 6 | + [Python Documentation for Reflux 🔗](Docs.md) 7 | + [List of all CSS Tokens and Vars🔗](Tokens.yaml) 8 | + [Testing Playground for Themes 🔗](https://playground.reflux.repl.co/) -------------------------------------------------------------------------------- /docs/Themes.md: -------------------------------------------------------------------------------- 1 | # Using Theme Files 2 | 3 | Reflux uses `YAML` files to create and generate themes on Replit. The file contains metadata for the theme, and of course, all the CSS tokens. These files can be saved with either a `.yml` or `.yaml` extension, just make sure to name it properly when loading it in Reflux. 4 | 5 | ## Specification 6 | 7 | 8 | **Category:** Meta, *required* 9 | 10 | **Fields:** 11 | + name, *required* - name of the theme, if you already have a theme with this name, uploading it will edit it 12 | + description, *required* - description of the theme, spice it up if you want people to use your theme! 13 | 14 | **Example:** 15 | ```yaml 16 | Meta: 17 | name: Solarized Dark 18 | description: The classic dark theme for machines and people, now on Replit! 19 | ``` 20 | 21 | ----- 22 | 23 | **Category:** Styles, *required* 24 | 25 | **Subcategories:** 26 | + root, *optional* - define CSS tokens for the `:root`, you rarely need to change these 27 | + tokens, *optinal* - define CSS tokens for both light and dark themes 28 | 29 | **Example:** 30 | ```yaml 31 | Styles: 32 | root: 33 | --border-radius-1: 1px 34 | --border-radius-2: 2px 35 | tokens: 36 | --background-root: "#0e1525" 37 | --background-default: "#1c2333" 38 | ``` 39 | 40 | ## References 41 | 42 | You can find a complete index of all the CSS tokens [here](). 43 | 44 | Here's a complete example of a finished theme for reference: 45 | 46 | ```yaml 47 | Meta: 48 | name: Solarized Dark 49 | description: The classic dark theme for machines and people, now on Replit! 50 | 51 | Styles: 52 | root: 53 | # Nothing to change here 54 | tokens: 55 | # Background Tokens 56 | # Assigned from Base03 to Base00 57 | --background-root: "#001b22" 58 | --background-default: "#002b36" 59 | --background-higher: "#073642" 60 | --background-highest: "#586e75" 61 | --background-overlay: "#0e1525a0" 62 | 63 | # Forground Tokens 64 | # Assigned from Base2 and Base3 65 | --foreground-default: "#e8e0c7" 66 | --foreground-dimmer: "#eee8d5" 67 | --foreground-dimmest: "#f4f0e3" 68 | 69 | # Primary Accent Tokens 70 | # Assigned from Blue Accents 71 | --accent-primary-strongest: "#1a5f90" 72 | --accent-primary-stronger: "#2075b1" 73 | --accent-primary-default: "#268bd2" 74 | --accent-primary-dimmer: "#429ddd" 75 | --accent-primary-dimmest: "#64aee3" 76 | 77 | # Red Accent Tokens 78 | # Assigned from Red Accents 79 | --accent-red-dimmest: "#850101" 80 | --accent-red-dimmer: "#ac0102" 81 | --accent-red-default: "#d30102" 82 | --accent-red-stronger: "#fa0102" 83 | --accent-red-strongest: "#fe2426" 84 | ``` -------------------------------------------------------------------------------- /docs/Tokens.yaml: -------------------------------------------------------------------------------- 1 | Meta: 2 | name: Tokens 3 | description: Base token values for Replit's Design System 4 | 5 | Styles: 6 | root: 7 | --border-radius-1: 1px 8 | --border-radius-2: 2px 9 | --border-radius-4: 4px 10 | --border-radius-8: 8px 11 | --border-radius-16: 16px 12 | --border-radius-default: var(--border-radius-8) 13 | --border-radius-round: 1028px 14 | 15 | --space-2: 2px 16 | --space-4: 4px 17 | --space-8: 8px 18 | --space-12: 12px 19 | --space-16: 16px 20 | --space-24: 24px 21 | --space-32: 32px 22 | --space-48: 48px 23 | --space-64: 64px 24 | --space-128: 128px 25 | --space-256: 256px 26 | --space-default: var(--space-8) 27 | 28 | --shadow-1: 0px 4px 8px 0px rgba(2, 2, 3, 0.16) 29 | --shadow-2: 0px 8px 16px 0px rgba(2, 2, 3, 0.32) 30 | --shadow-3: 0px 16px 32px 0px rgba(2, 2, 3, 0.48) 31 | --shadow-default: var(--shadow-1) 32 | 33 | --font-family-default: "IBM Plex Sans", sans-serif 34 | --font-family-code: "IBM Plex Mono", monospace 35 | --font-size-small: 12px 36 | --line-height-small: 1.5 37 | --font-size-default: 14px 38 | --line-height-default: 1.6 39 | --font-size-subhead-default: 16px 40 | --line-height-subhead-default: 1.375 41 | --font-size-subhead-big: 20px 42 | --line-height-subhead-big: 1.2 43 | --font-size-header-default: 24px 44 | --line-height-header-default: 1 45 | --font-size-header-big: 32px 46 | --line-height-header-big: 1 47 | --font-weight-regular: 400 48 | --font-weight-medium: 500 49 | --font-weight-bold: 600 50 | --border-width-default: 1px 51 | --single-line: 1 52 | 53 | --black: "#0e1525" 54 | --white: "#fcfcfc" 55 | tokens: 56 | --background-root: "#0e1525" 57 | --background-default: "#1c2333" 58 | --background-higher: "#2b3245" 59 | --background-highest: "#3c445c" 60 | --background-overlay: "#0e1525a0" 61 | 62 | --foreground-default: "#f5f9fc" 63 | --foreground-dimmer: "#c2c8cc" 64 | --foreground-dimmest: "#9da2a6" 65 | 66 | --outline-default: "#70788c" 67 | --outline-default-25: "#70788c40" 68 | --outline-dimmer: "#5f677a" 69 | --outline-dimmest: "#4e5569" 70 | 71 | --accent-primary-strongest: "#c7e9ff" 72 | --accent-primary-stronger: "#85ceff" 73 | --accent-primary-default: "#0099ff" 74 | --accent-primary-dimmer: "#0072bd" 75 | --accent-primary-dimmest: "#004d80" 76 | 77 | --accent-positive-strongest: "#bfffca" 78 | --accent-positive-stronger: "#96ffa8" 79 | --accent-positive-default: "#2fc448" 80 | --accent-positive-dimmer: "#0f7a21" 81 | --accent-positive-dimmest: "#0c4516" 82 | 83 | --accent-negative-strongest: "#ffbfbf" 84 | --accent-negative-stronger: "#ff8585" 85 | --accent-negative-default: "#f23f3f" 86 | --accent-negative-dimmer: "#8f2828" 87 | --accent-negative-dimmest: "#573a3a" 88 | 89 | --accent-red-dimmest: "#6e0000" 90 | --accent-red-dimmer: "#a60000" 91 | --accent-red-default: "#e50000" 92 | --accent-red-stronger: "#ff8585" 93 | --accent-red-strongest: "#ffc7c7" 94 | 95 | --accent-orange-dimmest: "#753b00" 96 | --accent-orange-dimmer: "#9c4e00" 97 | --accent-orange-default: "#d96d00" 98 | --accent-orange-stronger: "#ffc285" 99 | --accent-orange-strongest: "#ffd9b2" 100 | 101 | --accent-yellow-dimmest: "#756200" 102 | --accent-yellow-dimmer: "#a68a00" 103 | --accent-yellow-default: "#ccad14" 104 | --accent-yellow-stronger: "#ffea7f" 105 | --accent-yellow-strongest: "#fff2b2" 106 | 107 | --accent-green-dimmest: "#00540e" 108 | --accent-green-dimmer: "#007814" 109 | --accent-green-default: "#36b24a" 110 | --accent-green-stronger: "#66ff7f" 111 | --accent-green-strongest: "#b2ffbf" 112 | 113 | --accent-teal-dimmest: "#005b6e" 114 | --accent-teal-dimmer: "#007f99" 115 | --accent-teal-default: "#3db4cc" 116 | --accent-teal-stronger: "#7feaff" 117 | --accent-teal-strongest: "#bff4ff" 118 | 119 | --accent-blue-dimmest: "#004d99" 120 | --accent-blue-dimmer: "#005ebd" 121 | --accent-blue-default: "#2e8ae5" 122 | --accent-blue-stronger: "#7fbfff" 123 | --accent-blue-strongest: "#b2d9ff" 124 | 125 | --accent-blurple-dimmest: "#422f9e" 126 | --accent-blurple-dimmer: "#563cd6" 127 | --accent-blurple-default: "#7559ff" 128 | --accent-blurple-stronger: "#a18fff" 129 | --accent-blurple-strongest: "#cec4ff" 130 | 131 | --accent-purple-dimmest: "#6c32a6" 132 | --accent-purple-dimmer: "#9140e3" 133 | --accent-purple-default: "#a64dff" 134 | --accent-purple-stronger: "#c78fff" 135 | --accent-purple-strongest: "#e2c4ff" 136 | 137 | --accent-magenta-dimmest: "#802680" 138 | --accent-magenta-dimmer: "#b031b0" 139 | --accent-magenta-default: "#e55ae5" 140 | --accent-magenta-stronger: "#ff8aff" 141 | --accent-magenta-strongest: "#ffc2ff" 142 | 143 | --accent-pink-dimmest: "#802662" 144 | --accent-pink-dimmer: "#b03186" 145 | --accent-pink-default: "#e545b0" 146 | --accent-pink-stronger: "#ff8ad8" 147 | --accent-pink-strongest: "#ffc2eb" 148 | 149 | --accent-grey-dimmest: "#595959" 150 | --accent-grey-dimmer: "#666666" 151 | --accent-grey-default: "#808080" 152 | --accent-grey-stronger: "#999999" 153 | --accent-grey-strongest: "#bfbfbf" -------------------------------------------------------------------------------- /docs/theme.md: -------------------------------------------------------------------------------- 1 | # Source 2 | 3 | #### [`reflux/themes.py`](https://github.com/IreTheKID/Reflux/blob/master/reflux/theme.py) 4 | 5 | # Quickstart 6 | ```python 7 | import reflux 8 | 9 | theme = reflux.Theme({ 10 | "name": "New Theme", 11 | "author": "Myself", 12 | "description": None, 13 | "default": "light" 14 | }) 15 | ``` 16 | 17 | 18 | # Functions 19 | 20 | | \_\_init\_\_(*obj*)| Initialize the `Theme` object. | 21 | |:-------------------|:------------------------------------------------------------------| 22 | 23 | | Parameters | | | 24 | |:------------|:----------------|:-------------------------------------------------------| 25 | | name | `str` or `None` | Name of the theme. Defaults to `None`. | 26 | | author | `str` or `None` | Author of the theme. Defaults to `None`. | 27 | | description | `str` or `None` | Description of the theme. Defaults to `None`. | 28 | | default | `str` | Default color values for theme. Defaults to `"light"`. | 29 | 30 | **Note**: These are not named parameters. They are key-value pairs in the passed `obj`. 31 | 32 | --- 33 | 34 | | set_color(*name*, *value*)| Set a color to a given value. | 35 | |:-------------------|:------------------------------------------------------------------| 36 | 37 | | Parameters | | | 38 | |:------------|:----------------|:-------------------------------------------------------| 39 | | name | `str` | Name of the color value to be set. | 40 | | value | `str` | Any CSS3 compatible color value. | 41 | 42 | --- 43 | 44 | | set_colors(*obj*) | Sets multiple colors to the given values in a `dict`. | 45 | |:-------------------|:------------------------------------------------------------------| 46 | 47 | | Parameters | | | 48 | |:------------|:----------------|:-------------------------------------------------------| 49 | | obj | `dict` | keys are color names, values are color values. | 50 | 51 | --- 52 | 53 | | get_color(*name*)| Get the current value of a given color name. `None` if not found. | 54 | |:-------------------|:------------------------------------------------------------------| 55 | 56 | | Parameters | | | 57 | |:------------|:----------------|:-------------------------------------------------------| 58 | | name | `str` | Name of the color to get. | 59 | 60 | --- 61 | 62 | | build(*path*, *mode*)| Builds a JS Reflux theme with the current colors to the given file. | 63 | |:-------------------|:----------------------------------------------------------------------| 64 | 65 | | Parameters | | | 66 | |:------------|:----------------|:-------------------------------------------------------| 67 | | path | `str` | Path to the target file. Should be a valid directory. | 68 | | mode | `str` | [Mode character](https://docs.python.org/3/library/functions.html#open) to open the file with.| 69 | -------------------------------------------------------------------------------- /docs/values.md: -------------------------------------------------------------------------------- 1 | # Source 2 | 3 | #### [`reflux/themes.py`](https://github.com/IreTheKID/Reflux/blob/master/reflux/values.py) 4 | 5 | # Quickstart 6 | ```python 7 | from reflux.values import COLORS 8 | 9 | print("Light Theme Colors =", COLORS["light"]) 10 | 11 | print("Dark Theme Colors =", COLORS["dark"]) 12 | ``` 13 | 14 | # Details 15 | 16 | Reflux builds JavaScript Bookmarklets that inject CSS with your theme's color values. It overwrites Repl.it's default CSS by rewriting the classes that the IDE uses for colors. You can find a collection of all Repl.it's CSS styles [right here](https://github.com/IreTheKID/Repl.it-CSS-Index). 17 | 18 | # Index 19 | 20 | Here are all the default IDE colors for both light and dark modes. You can change them with `theme.set_color` or `theme.set_colors`. 21 | 22 | ```ini 23 | [LIGHT MODE COLORS] 24 | background-1 = "#ffffff" 25 | background-2 = "#f6f6f6" 26 | background-3 = "#eeeeee" 27 | control-1 = "#e0e0e0" 28 | control-2 = "#e9e9e9" 29 | control-3 = "#f3f3f3" 30 | border = "#e0e0e0" 31 | foreground-1 = "#363636" 32 | foreground-2 = "#6f6f6f" 33 | foreground-3 = "#949494" 34 | foreground-4 = "#b7b7b7" 35 | foreground-transparent-1 = "rgba(255 255 255 0.48)" 36 | foreground-transparent-2 = "rgba(255 255 255 0.24)" 37 | foreground-transparent-3 = "rgba(255 255 255 0.12)" 38 | primary-1 = "#3485e4" 39 | primary-2 = "#337ad1" 40 | primary-3 = "#3272c2" 41 | primary-4 = "#316ab4" 42 | primary-transparent-1 = "rgba(52 133 228 0.48)" 43 | primary-transparent-2 = "rgba(52 133 228 0.24)" 44 | primary-transparent-3 = "rgba(52 133 228 0.12)" 45 | negative-1 = "#ff491c" 46 | negative-2 = "#e9441b" 47 | negative-3 = "#d8411b" 48 | negative-4 = "#c93d1a" 49 | negative-transparent-1 = "rgba(255 73 28 0.48)" 50 | negative-transparent-2 = "rgba(255 73 28 0.24)" 51 | negative-transparent-3 = "rgba(255 73 28 0.12)" 52 | warning-1 = "#eb6404" 53 | warning-2 = "#d65c08" 54 | warning-3 = "#c7560b" 55 | warning-4 = "#b8510d" 56 | warning-transparent-1 = "rgba(242 103 2 0.48)" 57 | warning-transparent-2 = "rgba(242 103 2 0.24)" 58 | warning-transparent-3 = "rgba(242 103 2 0.12)" 59 | positive-1 = "#21a243" 60 | positive-2 = "#21953e" 61 | positive-3 = "#228a3a" 62 | positive-4 = "#228037" 63 | positive-transparent-1 = "rgba(24 204 81 0.48)" 64 | positive-transparent-2 = "rgba(24 204 81 0.24)" 65 | positive-transparent-3 = "rgba(24 204 81 0.12)" 66 | 67 | [DARK MODE COLROS] 68 | background-1 = "#1d2333", 69 | background-2 = "#171d2d", 70 | background-3 = "#0e1525", 71 | control-1 = "#313646", 72 | control-2 = "#2b3140", 73 | control-3 = "#262b3b", 74 | border-1 = "#313646", 75 | foreground-1 = "#e1e2e4", 76 | foreground-2 = "#90939c", 77 | foreground-3 = "#696d78", 78 | foreground-4 = "#4e525f", 79 | foreground-transparent-1 = "rgba(14, 21, 37, 0.48)", 80 | foreground-transparent-2 = "rgba(14, 21, 37, 0.24)", 81 | foreground-transparent-3 = "rgba(14, 21, 37, 0.12)", 82 | primary-1 = "#3485e4", 83 | primary-2 = "#337bd2", 84 | primary-3 = "#3273c4", 85 | primary-4 = "#316cb8", 86 | primary-transparent-1 = "rgba(52, 133, 228, 0.48)", 87 | primary-transparent-2 = "rgba(52, 133, 228, 0.24)", 88 | primary-transparent-3 = "rgba(52, 133, 228, 0.12)", 89 | negative-1 = "#ff491c", 90 | negative-2 = "#eb451b", 91 | negative-3 = "#db411b", 92 | negative-4 = "#cd3e1a", 93 | negative-transparent-1 = "rgba(255, 73, 28, 0.48)", 94 | negative-transparent-2 = "rgba(255, 73, 28, 0.24)", 95 | negative-transparent-3 = "rgba(255, 73, 28, 0.12)", 96 | warning-1 = "#f26702", 97 | warning-2 = "#de5f07", 98 | warning-3 = "#ce590a", 99 | warning-4 = "#c0540c", 100 | warning-transparent-1 = "rgba(242, 103, 2, 0.48)", 101 | warning-transparent-2 = "rgba(242, 103, 2, 0.24)", 102 | warning-transparent-3 = "rgba(242, 103, 2, 0.12)", 103 | positive-1 = "#20ab46", 104 | positive-2 = "#219d41", 105 | positive-3 = "#22923d", 106 | positive-4 = "#22883a", 107 | positive-transparent-1 = "rgba(24, 204, 81, 0.48)", 108 | positive-transparent-2 = "rgba(24, 204, 81, 0.24)", 109 | positive-transparent-3 = "rgba(24, 204, 81, 0.12)" 110 | ``` 111 | -------------------------------------------------------------------------------- /reflux/__init__.py: -------------------------------------------------------------------------------- 1 | from reflux.theme import Theme 2 | from reflux.theme import make_engine 3 | 4 | from reflux.resources import shelf as Resources 5 | 6 | __all__ = ["Theme", "Resources", "make_engine"] 7 | __author__ = "frissyn" 8 | __version__ = "1.1.0" 9 | __doc__ = "Extensive styling and theming functionality for Replit." 10 | -------------------------------------------------------------------------------- /reflux/engine/reflux.js: -------------------------------------------------------------------------------- 1 | (function reflux() { 2 | let referral = prompt("Enter a Reflux referral code."); 3 | 4 | if (referral == null || referral == "") { 5 | alert("Reflux theme injection cancelled."); 6 | } else { 7 | let URL = "https://api.reflux.repl.co/theme/"; 8 | 9 | fetch(URL + referral) 10 | .then(res => res.json()) 11 | .then(data => { 12 | let confirmed = confirm( 13 | `Name: ${data["name"]} \n` + 14 | `Author: ${data["author"]["name"]} \n` + 15 | `Description: ${data["description"]} \n` + 16 | `Downloads: ${data["downloads"]} \n\n` + 17 | `Load this theme?` 18 | ); 19 | 20 | if (confirmed) { 21 | let target = document.getElementById("reflux-target"); 22 | if (!target) {target = document.createElement("style")}; 23 | 24 | target.type = "text/css"; 25 | target.id = "reflux-target"; 26 | target.textContent = data["stylesheet"]; 27 | document.getElementsByTagName("head")[0].appendChild(target); 28 | 29 | setTimeout(function() { 30 | monaco.editor.defineTheme("RefluxTheme", { 31 | base: "vs-dark", 32 | colors: { 33 | "editor.background": data["monaco"], 34 | "editor.selectionBackground": "#0f0fff", 35 | "editorCursor.foreground": "#ffffff", 36 | }, 37 | inherit: true, 38 | rules: [ 39 | { token: "", foreground: "#ffffff" }, 40 | ] 41 | }); 42 | 43 | store.subscribe(() => monaco.editor.setTheme("RefluxTheme")); 44 | }, 2000); 45 | 46 | /* 47 | MIT License 48 | 49 | Copyright (c) 2021 Brandon Lee, Connor Dennison, Piero Maddaleni, Scoder, Spidunno, and Coderma51 50 | 51 | Permission is hereby granted, free of charge, to any person obtaining a copy 52 | of this software and associated documentation files (the "Software"), to deal 53 | in the Software without restriction, including without limitation the rights 54 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 55 | copies of the Software, and to permit persons to whom the Software is 56 | furnished to do so, subject to the following conditions: 57 | 58 | The above copyright notice and this permission notice shall be included in all 59 | copies or substantial portions of the Software. 60 | 61 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 62 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 63 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 64 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 65 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 66 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 67 | SOFTWARE. 68 | */ 69 | 70 | let topButtons = document.querySelectorAll('*[style="align-items: center; display: flex; justify-content: space-between;"]'); 71 | topButtons[0].click(); 72 | let canvasConsole = document.getElementsByClassName('xterm-text-layer')[0]; 73 | topButtons[1].click(); 74 | setTimeout(function(){ 75 | let canvasShell = document.getElementsByClassName('xterm-text-layer')[1]; 76 | 77 | 78 | topButtons[0].click(); 79 | 80 | let ctxConsole = canvasConsole.getContext("2d"); 81 | let ctxShell = canvasShell.getContext("2d"); 82 | 83 | ctxConsole.fillRectOriginal = ctxConsole.fillRect; 84 | ctxShell.fillRectOriginal = ctxShell.fillRect; 85 | 86 | 87 | ctxConsole.fillRect = function (...args) { 88 | ctxConsole.fillStyle = data["xterm"]; 89 | ctxConsole.fillRectOriginal(...args) 90 | } 91 | 92 | ctxShell.fillRect = function (...args) { 93 | ctxShell.fillStyle = data["xterm"]; 94 | ctxShell.fillRectOriginal(...args) 95 | } 96 | 97 | }, 500) 98 | 99 | alert(`Loaded '${data["name"]}' into Replit, enjoy!`); 100 | } 101 | }) 102 | .catch(err => alert("Couldn't load theme.\n" + err)) 103 | } 104 | })(); -------------------------------------------------------------------------------- /reflux/engine/reflux.min.js: -------------------------------------------------------------------------------- 1 | !function(){let e=prompt("Enter a Reflux referral code.");if(null==e||""==e)alert("Reflux theme injection cancelled.");else{fetch("https://api.reflux.repl.co/theme/"+e).then(e=>e.json()).then(e=>{if(confirm(`Name: ${e.name} \n`+`Author: ${e.author.name} \n`+`Description: ${e.description} \n`+`Downloads: ${e.downloads} \n\n`+"Load this theme?")){let t=document.getElementById("reflux-target");t||(t=document.createElement("style")),t.type="text/css",t.id="reflux-target",t.textContent=e.stylesheet,document.getElementsByTagName("head")[0].appendChild(t),setTimeout(function(){monaco.editor.defineTheme("RefluxTheme",{base:"vs-dark",colors:{"editor.background":e.monaco,"editor.selectionBackground":"#0f0fff","editorCursor.foreground":"#ffffff"},inherit:!0,rules:[{token:"",foreground:"#ffffff"}]}),store.subscribe(()=>monaco.editor.setTheme("RefluxTheme"))},2e3);let l=document.querySelectorAll('*[style="align-items: center; display: flex; justify-content: space-between;"]');l[0].click();let n=document.getElementsByClassName("xterm-text-layer")[0];l[1].click(),setTimeout(function(){let t=document.getElementsByClassName("xterm-text-layer")[1];l[0].click();let o=n.getContext("2d"),i=t.getContext("2d");o.fillRectOriginal=o.fillRect,i.fillRectOriginal=i.fillRect,o.fillRect=function(...t){o.fillStyle=e.xterm,o.fillRectOriginal(...t)},i.fillRect=function(...t){i.fillStyle=e.xterm,i.fillRectOriginal(...t)}},500),alert(`Loaded '${e.name}' into Replit, enjoy!`)}}).catch(e=>alert("Couldn't load theme.\n"+e))}}(); -------------------------------------------------------------------------------- /reflux/engine/theme.js: -------------------------------------------------------------------------------- 1 | function reflux(referral) { 2 | if (referral == null || referral == "") { 3 | alert("Given referral code is empty or null."); 4 | } else { 5 | let URL = "https://api.reflux.repl.co/theme/"; 6 | 7 | fetch(URL + referral) 8 | .then(res => res.json()) 9 | .then(data => { 10 | let confirmed = confirm( 11 | `Name: ${data["name"]} \n` + 12 | `Author: ${data["author"]["name"]} \n` + 13 | `Description: ${data["description"]} \n` + 14 | `Downloads: ${data["downloads"]} \n\n` + 15 | `Load this theme?` 16 | ); 17 | 18 | if (confirmed) { 19 | let target = document.getElementById("reflux-target"); 20 | if (!target) {target = document.createElement("style")}; 21 | 22 | target.type = "text/css"; 23 | target.id = "reflux-target"; 24 | target.textContent = data["stylesheet"]; 25 | document.getElementsByTagName("head")[0].appendChild(target); 26 | 27 | alert(`Loaded '${data["name"]}' into Replit, enjoy!`); 28 | } 29 | }) 30 | .catch(err => alert("Couldn't load theme.\n" + err)) 31 | } 32 | }; 33 | 34 | reflux("{{ referral }}"); -------------------------------------------------------------------------------- /reflux/engine/theme.min.js: -------------------------------------------------------------------------------- 1 | function reflux(e){if(null==e||""==e)alert("Given referral code is empty or null.");else{fetch("https://api.reflux.repl.co/theme/"+e).then(e=>e.json()).then(e=>{if(confirm(`Name: ${e.name} \n`+`Author: ${e.author.name} \n`+`Description: ${e.description} \n`+`Downloads: ${e.downloads} \n\n`+"Load this theme?")){let t=document.getElementById("reflux-target");t||(t=document.createElement("style")),t.type="text/css",t.id="reflux-target",t.textContent=e.stylesheet,document.getElementsByTagName("head")[0].appendChild(t),alert(`Loaded '${e.name}' into Replit, enjoy!`)}}).catch(e=>alert("Couldn't load theme.\n"+e))}}reflux("{{ referral }}"); -------------------------------------------------------------------------------- /reflux/errors.py: -------------------------------------------------------------------------------- 1 | class Error(Exception): 2 | pass 3 | 4 | 5 | class RefluxAPIError(Error): 6 | def __init__(self, code, context): 7 | self.code = code 8 | self.error = "" 9 | self.context = context.content() 10 | 11 | if self.code == 400: 12 | self.error = "Theme could not be formatted correctly." 13 | elif self.code == 401: 14 | self.error = "Provided publish_key is invalid or expired." 15 | elif self.code == 500: 16 | self.error = "The API encounted an internal error, please try again later." 17 | 18 | def __str__(self): 19 | return f"{self.error}\nRaw response:{self.context}" 20 | 21 | 22 | class NotUploadedError(Error): 23 | def __init__(self, name): 24 | self.name = name 25 | 26 | def __str__(self): 27 | return ( 28 | f"Theme '{self.name}' has no upload data." 29 | + " Please upload the theme before getting a referral code." 30 | ) 31 | 32 | 33 | class MissingFieldError(Error): 34 | def __init__(self, name, field): 35 | self.name = name 36 | self.field = field 37 | 38 | def __str__(self): 39 | return f"{self.name} is missing required field: '{self.field}'" 40 | 41 | 42 | class MissingCategoryError(Error): 43 | def __init__(self, name, cat): 44 | self.name = name 45 | self.cat = cat 46 | 47 | def __str__(self): 48 | return f"{self.name} is missing required category: '{self.cat}'" 49 | -------------------------------------------------------------------------------- /reflux/resources.py: -------------------------------------------------------------------------------- 1 | import pathlib 2 | 3 | path = pathlib.Path(__file__).parent 4 | 5 | 6 | class Resources(object): 7 | def __init__(self): 8 | self.categories = ["root", "light", "dark"] 9 | self.headers = { 10 | "root": ".replit-ui-theme-root, :root", 11 | "tokens": ".replit-ui-theme-root.light, .replit-ui-theme-root.dark", 12 | } 13 | 14 | self.engine = "javascript:" 15 | self.engine += path.joinpath("engine/reflux.min.js").read_text() 16 | 17 | self.theme_engine = "javascript:" 18 | self.theme_engine += path.joinpath("engine/theme.min.js").read_text() 19 | 20 | for c in self.categories: 21 | content = path.joinpath(f"variables/{c}.txt") 22 | 23 | jar = self._create_var_jar(content.read_text()) 24 | jar["_keys"] = list(jar.keys()) 25 | 26 | self.__setattr__(c, jar) 27 | 28 | def _create_var_jar(self, contents: str): 29 | jar = {} 30 | 31 | for line in contents.split(";\n"): 32 | k, v = line.split(":") 33 | jar[k] = v[1:] 34 | 35 | return jar 36 | 37 | 38 | shelf = Resources() 39 | -------------------------------------------------------------------------------- /reflux/theme.py: -------------------------------------------------------------------------------- 1 | import yaml 2 | import pathlib 3 | import requests 4 | 5 | from reflux.resources import shelf 6 | 7 | from reflux.errors import RefluxAPIError 8 | from reflux.errors import NotUploadedError 9 | from reflux.errors import MissingFieldError 10 | from reflux.errors import MissingCategoryError 11 | 12 | API = "https://api.reflux.repl.co" 13 | PATH = pathlib.Path(__file__).parent.resolve() 14 | 15 | 16 | def make_engine(code: str, file=None): 17 | engine = shelf.theme_engine.replace("{{ referral }}", code) 18 | 19 | if file: 20 | with open(file, "w+") as stream: 21 | stream.write(engine) 22 | 23 | return engine 24 | 25 | 26 | class Theme(object): 27 | def __init__(self, path): 28 | with open(path, "r") as stream: 29 | data = yaml.safe_load(stream) 30 | 31 | self._raise_for_errors(data) 32 | 33 | self.name = data["Meta"]["name"] 34 | self.description = data["Meta"]["description"] 35 | self.styles = {"root": shelf.root, "tokens": shelf.dark} 36 | 37 | if data["Styles"].get("root"): 38 | self.styles["root"].update(data["Styles"]["root"]) 39 | 40 | if data["Styles"].get("tokens"): 41 | self.styles["tokens"].update(data["Styles"]["tokens"]) 42 | 43 | if "Advanced" in data.keys(): 44 | if "monaco" in data["Advanced"]: 45 | self.monaco = data["Advanced"]["monaco"] 46 | if "xterm" in data["Advanced"]: 47 | self.xterm = data["Advanced"]["xterm"] 48 | 49 | def _raise_for_errors(self, d): 50 | for t in ["Meta", "Styles"]: 51 | if not d.get(t): 52 | raise MissingCategoryError("Theme", t) 53 | 54 | for f in ["name", "description"]: 55 | if not d["Meta"].get(f): 56 | raise MissingFieldError("Meta", f) 57 | 58 | return 59 | 60 | def _raise_for_responses(self, r): 61 | if r.status_code >= 400: 62 | raise RefluxAPIError(r.status_code, r) 63 | else: 64 | return 65 | 66 | def to_stylesheet(self, file=None): 67 | text = "" 68 | 69 | for header in ["root", "tokens"]: 70 | if self.styles.get(header): 71 | text += shelf.headers[header] + "{" 72 | 73 | for token, value in self.styles[header].items(): 74 | if not token.startswith("_") and token != "": 75 | text += f"{token}: {value} !important;" 76 | 77 | text += "}" 78 | 79 | text = text.replace(" !important;}", "}") 80 | 81 | if file: 82 | with open(file, "w+") as f: 83 | f.write(text) 84 | 85 | return text 86 | 87 | def upload(self, publish_key): 88 | r = requests.post( 89 | f"{API}/theme/upload", 90 | json={ 91 | "name": self.name, 92 | "description": self.description, 93 | "stylesheet": self.to_stylesheet(), 94 | "monaco": self.monaco, 95 | "xterm": self.xterm, 96 | "publish_key": publish_key, 97 | }, 98 | ) 99 | 100 | self._raise_for_responses(r) 101 | self.data = r.json() 102 | 103 | return self.data 104 | 105 | def referral(self): 106 | try: 107 | return self.data["referral"] 108 | except: 109 | raise NotUploadedError(self.name) 110 | 111 | def engine(self, file=None): 112 | return make_engine(self.referral(), file) 113 | -------------------------------------------------------------------------------- /reflux/variables/dark.txt: -------------------------------------------------------------------------------- 1 | --background-root: #0e1525; 2 | --background-default: #1c2333; 3 | --background-higher: #2b3245; 4 | --background-highest: #3c445c; 5 | --background-overlay: #0e1525a0; 6 | --foreground-default: #f5f9fc; 7 | --foreground-dimmer: #c2c8cc; 8 | --foreground-dimmest: #9da2a6; 9 | --outline-default: #70788c; 10 | --outline-default-25: #70788c40; 11 | --outline-dimmer: #5f677a; 12 | --outline-dimmest: #4e5569; 13 | --accent-primary-strongest: #c7e9ff; 14 | --accent-primary-stronger: #85ceff; 15 | -webkit---accent-primary-default: #0099ff; 16 | --accent-primary-default: #0099ff; 17 | --accent-primary-dimmer: #0072bd; 18 | -webkit---accent-primary-dimmest: #004d80; 19 | --accent-primary-dimmest: #004d80; 20 | --accent-positive-strongest: #bfffca; 21 | --accent-positive-stronger: #96ffa8; 22 | --accent-positive-default: #2fc448; 23 | -webkit---accent-positive-dimmer: #0f7a21; 24 | --accent-positive-dimmer: #0f7a21; 25 | --accent-positive-dimmest: #0c4516; 26 | --accent-negative-strongest: #ffbfbf; 27 | --accent-negative-stronger: #ff8585; 28 | --accent-negative-default: #f23f3f; 29 | -webkit---accent-negative-dimmer: #8f2828; 30 | --accent-negative-dimmer: #8f2828; 31 | --accent-negative-dimmest: #573a3a; 32 | --accent-red-dimmest: #6e0000; 33 | --accent-red-dimmer: #a60000; 34 | --accent-red-default: #e50000; 35 | --accent-red-stronger: #ff8585; 36 | --accent-red-strongest: #ffc7c7; 37 | --accent-orange-dimmest: #753b00; 38 | --accent-orange-dimmer: #9c4e00; 39 | --accent-orange-default: #d96d00; 40 | -webkit---accent-orange-stronger: #ffc285; 41 | --accent-orange-stronger: #ffc285; 42 | --accent-orange-strongest: #ffd9b2; 43 | --accent-yellow-dimmest: #756200; 44 | --accent-yellow-dimmer: #a68a00; 45 | --accent-yellow-default: #ccad14; 46 | -webkit---accent-yellow-stronger: #ffea7f; 47 | --accent-yellow-stronger: #ffea7f; 48 | --accent-yellow-strongest: #fff2b2; 49 | --accent-green-dimmest: #00540e; 50 | --accent-green-dimmer: #007814; 51 | --accent-green-default: #36b24a; 52 | --accent-green-stronger: #66ff7f; 53 | -webkit---accent-green-strongest: #b2ffbf; 54 | --accent-green-strongest: #b2ffbf; 55 | --accent-teal-dimmest: #005b6e; 56 | --accent-teal-dimmer: #007f99; 57 | --accent-teal-default: #3db4cc; 58 | --accent-teal-stronger: #7feaff; 59 | --accent-teal-strongest: #bff4ff; 60 | --accent-blue-dimmest: #004d99; 61 | --accent-blue-dimmer: #005ebd; 62 | --accent-blue-default: #2e8ae5; 63 | --accent-blue-stronger: #7fbfff; 64 | --accent-blue-strongest: #b2d9ff; 65 | -webkit---accent-blurple-dimmest: #422f9e; 66 | --accent-blurple-dimmest: #422f9e; 67 | --accent-blurple-dimmer: #563cd6; 68 | -webkit---accent-blurple-default: #7559ff; 69 | --accent-blurple-default: #7559ff; 70 | --accent-blurple-stronger: #a18fff; 71 | --accent-blurple-strongest: #cec4ff; 72 | --accent-purple-dimmest: #6c32a6; 73 | --accent-purple-dimmer: #9140e3; 74 | --accent-purple-default: #a64dff; 75 | -webkit---accent-purple-stronger: #c78fff; 76 | --accent-purple-stronger: #c78fff; 77 | --accent-purple-strongest: #e2c4ff; 78 | -webkit---accent-magenta-dimmest: #802680; 79 | --accent-magenta-dimmest: #802680; 80 | --accent-magenta-dimmer: #b031b0; 81 | -webkit---accent-magenta-default: #e55ae5; 82 | --accent-magenta-default: #e55ae5; 83 | --accent-magenta-stronger: #ff8aff; 84 | --accent-magenta-strongest: #ffc2ff; 85 | --accent-pink-dimmest: #802662; 86 | --accent-pink-dimmer: #b03186; 87 | --accent-pink-default: #e545b0; 88 | --accent-pink-stronger: #ff8ad8; 89 | --accent-pink-strongest: #ffc2eb; 90 | --accent-grey-dimmest: #595959; 91 | --accent-grey-dimmer: #666666; 92 | --accent-grey-default: #808080; 93 | --accent-grey-stronger: #999999; 94 | --accent-grey-strongest: #bfbfbf; -------------------------------------------------------------------------------- /reflux/variables/light.txt: -------------------------------------------------------------------------------- 1 | --background-root: #ebeced; 2 | --background-default: #fcfcfc; 3 | --background-higher: #f0f1f2; 4 | --background-highest: #e4e5e6; 5 | --background-overlay: #f0f1f2a0; 6 | --foreground-default: #07080a; 7 | --foreground-dimmer: #3d4047; 8 | --foreground-dimmest: #5c5f66; 9 | --outline-default: #afb1b3; 10 | --outline-default-25: #afb1b340; 11 | --outline-dimmer: #c0c3c4; 12 | --outline-dimmest: #d2d4d6; 13 | --accent-primary-strongest: #004d80; 14 | --accent-primary-stronger: #0072bd; 15 | -webkit---accent-primary-default: #0099ff; 16 | --accent-primary-default: #0099ff; 17 | --accent-primary-dimmer: #85ceff; 18 | -webkit---accent-primary-dimmest: #c7e9ff; 19 | --accent-primary-dimmest: #c7e9ff; 20 | --accent-positive-strongest: #0c4516; 21 | --accent-positive-stronger: #0f7a21; 22 | --accent-positive-default: #2fc448; 23 | -webkit---accent-positive-dimmer: #76db87; 24 | --accent-positive-dimmer: #76db87; 25 | --accent-positive-dimmest: #a8f0b4; 26 | --accent-negative-strongest: #520f0f; 27 | --accent-negative-stronger: #8a0a0a; 28 | --accent-negative-default: #f23f3f; 29 | -webkit---accent-negative-dimmer: #ff8585; 30 | --accent-negative-dimmer: #ff8585; 31 | --accent-negative-dimmest: #ffc7c7; 32 | --accent-red-dimmest: #ffc7c7; 33 | --accent-red-dimmer: #ff8585; 34 | --accent-red-default: #e50000; 35 | --accent-red-stronger: #a60000; 36 | --accent-red-strongest: #6e0000; 37 | --accent-orange-dimmest: #ffd9b2; 38 | --accent-orange-dimmer: #ffc285; 39 | --accent-orange-default: #d96d00; 40 | -webkit---accent-orange-stronger: #9c4e00; 41 | --accent-orange-stronger: #9c4e00; 42 | --accent-orange-strongest: #753b00; 43 | --accent-yellow-dimmest: #fff2b2; 44 | --accent-yellow-dimmer: #ffea7f; 45 | --accent-yellow-default: #ccad14; 46 | -webkit---accent-yellow-stronger: #a68a00; 47 | --accent-yellow-stronger: #a68a00; 48 | --accent-yellow-strongest: #756200; 49 | --accent-green-dimmest: #b2ffbf; 50 | --accent-green-dimmer: #66ff7f; 51 | --accent-green-default: #36b24a; 52 | --accent-green-stronger: #007814; 53 | -webkit---accent-green-strongest: #00540e; 54 | --accent-green-strongest: #00540e; 55 | --accent-teal-dimmest: #bff4ff; 56 | --accent-teal-dimmer: #7feaff; 57 | --accent-teal-default: #3db4cc; 58 | --accent-teal-stronger: #007f99; 59 | --accent-teal-strongest: #005b6e; 60 | --accent-blue-dimmest: #b2d9ff; 61 | --accent-blue-dimmer: #7fbfff; 62 | --accent-blue-default: #2e8ae5; 63 | --accent-blue-stronger: #005ebd; 64 | --accent-blue-strongest: #004d99; 65 | -webkit---accent-blurple-dimmest: #cec4ff; 66 | --accent-blurple-dimmest: #cec4ff; 67 | --accent-blurple-dimmer: #a18fff; 68 | -webkit---accent-blurple-default: #7559ff; 69 | --accent-blurple-default: #7559ff; 70 | --accent-blurple-stronger: #563cd6; 71 | --accent-blurple-strongest: #422f9e; 72 | --accent-purple-dimmest: #e2c4ff; 73 | --accent-purple-dimmer: #c78fff; 74 | --accent-purple-default: #a64dff; 75 | -webkit---accent-purple-stronger: #9140e3; 76 | --accent-purple-stronger: #9140e3; 77 | --accent-purple-strongest: #6c32a6; 78 | -webkit---accent-magenta-dimmest: #ffc2ff; 79 | --accent-magenta-dimmest: #ffc2ff; 80 | --accent-magenta-dimmer: #ff8aff; 81 | -webkit---accent-magenta-default: #e55ae5; 82 | --accent-magenta-default: #e55ae5; 83 | --accent-magenta-stronger: #b0319b; 84 | --accent-magenta-strongest: #802680; 85 | --accent-pink-dimmest: #ffc2eb; 86 | --accent-pink-dimmer: #ff8ad8; 87 | --accent-pink-default: #e545b0; 88 | --accent-pink-stronger: #b03186; 89 | --accent-pink-strongest: #802662; 90 | --accent-grey-dimmest: #bfbfbf; 91 | --accent-grey-dimmer: #999999; 92 | --accent-grey-default: #808080; 93 | --accent-grey-stronger: #666666; 94 | --accent-grey-strongest: #595959; -------------------------------------------------------------------------------- /reflux/variables/root.txt: -------------------------------------------------------------------------------- 1 | --border-radius-1: 1px; 2 | --border-radius-2: 2px; 3 | --border-radius-4: 4px; 4 | --border-radius-8: 8px; 5 | --border-radius-16: 16px; 6 | --border-radius-default: var(--border-radius-8); 7 | --border-radius-round: 1028px; 8 | --space-2: 2px; 9 | --space-4: 4px; 10 | --space-8: 8px; 11 | --space-12: 12px; 12 | --space-16: 16px; 13 | --space-24: 24px; 14 | --space-32: 32px; 15 | --space-48: 48px; 16 | --space-64: 64px; 17 | --space-128: 128px; 18 | --space-256: 256px; 19 | --space-default: var(--space-8); 20 | --shadow-1: 0px 4px 8px 0px rgba(2, 2, 3, 0.16); 21 | --shadow-2: 0px 8px 16px 0px rgba(2, 2, 3, 0.32); 22 | --shadow-3: 0px 16px 32px 0px rgba(2, 2, 3, 0.48); 23 | --shadow-default: var(--shadow-1); 24 | --font-family-default: "IBM Plex Sans", sans-serif; 25 | --font-family-code: "IBM Plex Mono", monospace; 26 | --font-size-small: 12px; 27 | --line-height-small: 1.5; 28 | --font-size-default: 14px; 29 | --line-height-default: 1.6; 30 | --font-size-subhead-default: 16px; 31 | --line-height-subhead-default: 1.375; 32 | --font-size-subhead-big: 20px; 33 | --line-height-subhead-big: 1.2; 34 | --font-size-header-default: 24px; 35 | --line-height-header-default: 1; 36 | --font-size-header-big: 32px; 37 | --line-height-header-big: 1; 38 | --font-weight-regular: 400; 39 | --font-weight-medium: 500; 40 | --font-weight-bold: 600; 41 | --border-width-default: 1px; 42 | --single-line: 1; 43 | --black: #0e1525; 44 | --white: #fcfcfc; -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | import reflux 2 | import setuptools 3 | 4 | readme = open("README.md").read() 5 | url = "https://github.com/frissyn/Reflux" 6 | 7 | setuptools.setup( 8 | name="reflux", 9 | license="MIT", 10 | author="frissyn", 11 | description=reflux.__doc__, 12 | version=reflux.__version__, 13 | 14 | url=url, 15 | project_urls={ 16 | "Source Code": url, 17 | "Pull Requests": url + "/pulls", 18 | "Issue Tracker": url + "/issues", 19 | "Documentation": url + "/tree/master/docs" 20 | }, 21 | 22 | long_description=readme, 23 | long_description_content_type="text/markdown", 24 | 25 | python_requires=">=3.7.0", 26 | install_requires=["pyyaml"], 27 | 28 | zip_safe=False, 29 | packages=["reflux"], 30 | include_package_data=True, 31 | 32 | classifiers=[ 33 | "License :: OSI Approved :: MIT License", 34 | "Intended Audience :: Developers", 35 | "Operating System :: OS Independent", 36 | "Programming Language :: Python :: 3.8", 37 | "Programming Language :: Python :: 3.9", 38 | "Topic :: Software Development" 39 | ] 40 | ) -------------------------------------------------------------------------------- /themes/blueberry/blueberry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frissyn/Reflux/99f05efaaf307cd8a9c0a44a8c2dc3d65e14d725/themes/blueberry/blueberry.png -------------------------------------------------------------------------------- /themes/blueberry/theme.min.js: -------------------------------------------------------------------------------- 1 | javascript:(function() {let p1=document.getElementById("reflux-theme");let p2=document.getElementById("reflux-display");if (p1 && p2) {var go=confirm("There is a Reflux theme already running. Would you like to stop it?");if (go) {p1.remove();p2.remove();alert("This theme has been stopped.");} else {alert("This theme will continue running.");}} else {var go=confirm("Run this Reflux Theme?\n\nName: Blueberry\nAuthor: frissyn\nDescription: Make your Repl IDE a blueberry color scheme!");if (go) {var style=document.createElement("style");var head=document.getElementsByTagName("head")[0];var target=document.getElementsByClassName("jsx-2607100739")[0];style.setAttribute("id", "reflux-theme");style.appendChild(document.createTextNode(`.replit-ui-theme-root.dark{--color-background-1: #6495ed !important;--color-background-2: #76a1ef !important;--color-background-3: #87adf1 !important;--color-control-1: #313646 !important;--color-control-2: #2b3140 !important;--color-control-3: #262b3b !important;--color-border: #00008b !important;--color-foreground-1: #590059 !important;--color-foreground-2: #450045 !important;--color-foreground-3: #320032 !important;--color-foreground-4: #1e001e !important;--color-foreground-transparent-1: rgba(14, 21, 37, 0.48) !important;--color-foreground-transparent-2: rgba(14, 21, 37, 0.24) !important;--color-foreground-transparent-3: rgba(14, 21, 37, 0.12) !important;--color-primary-1: #00008b !important;--color-primary-2: #00009f !important;--color-primary-3: #0000b2 !important;--color-primary-4: #0000c6 !important;--color-primary-transparent-1: rgba(52, 133, 228, 0.48) !important;--color-primary-transparent-2: rgba(52, 133, 228, 0.24) !important;--color-primary-transparent-3: rgba(52, 133, 228, 0.12) !important;--color-negative-1: #ff491c !important;--color-negative-2: #eb451b !important;--color-negative-3: #db411b !important;--color-negative-4: #cd3e1a !important;--color-negative-transparent-1: rgba(255, 73, 28, 0.48) !important;--color-negative-transparent-2: rgba(255, 73, 28, 0.24) !important;--color-negative-transparent-3: rgba(255, 73, 28, 0.12) !important;--color-warning-1: #f26702 !important;--color-warning-2: #de5f07 !important;--color-warning-3: #ce590a !important;--color-warning-4: #c0540c !important;--color-warning-transparent-1: rgba(242, 103, 2, 0.48) !important;--color-warning-transparent-2: rgba(242, 103, 2, 0.24) !important;--color-warning-transparent-3: rgba(242, 103, 2, 0.12) !important;--color-positive-1: #000077 !important;--color-positive-2: #00008b !important;--color-positive-3: #00009f !important;--color-positive-4: #0000b2 !important;--color-positive-transparent-1: rgba(0, 0, 139, 0.48) !important;--color-positive-transparent-2: rgba(0, 0, 139, 0.24) !important;--color-positive-transparent-3: rgba(0, 0, 139, 0.12) !important;}.replit-ui-theme-root.light{--color-background-1: #6495ed !important;--color-background-2: #76a1ef !important;--color-background-3: #87adf1 !important;--color-control-1: #313646 !important;--color-control-2: #2b3140 !important;--color-control-3: #262b3b !important;--color-border: #00008b !important;--color-foreground-1: #590059 !important;--color-foreground-2: #450045 !important;--color-foreground-3: #320032 !important;--color-foreground-4: #1e001e !important;--color-foreground-transparent-1: rgba(14, 21, 37, 0.48) !important;--color-foreground-transparent-2: rgba(14, 21, 37, 0.24) !important;--color-foreground-transparent-3: rgba(14, 21, 37, 0.12) !important;--color-primary-1: #00008b !important;--color-primary-2: #00009f !important;--color-primary-3: #0000b2 !important;--color-primary-4: #0000c6 !important;--color-primary-transparent-1: rgba(52, 133, 228, 0.48) !important;--color-primary-transparent-2: rgba(52, 133, 228, 0.24) !important;--color-primary-transparent-3: rgba(52, 133, 228, 0.12) !important;--color-negative-1: #ff491c !important;--color-negative-2: #eb451b !important;--color-negative-3: #db411b !important;--color-negative-4: #cd3e1a !important;--color-negative-transparent-1: rgba(255, 73, 28, 0.48) !important;--color-negative-transparent-2: rgba(255, 73, 28, 0.24) !important;--color-negative-transparent-3: rgba(255, 73, 28, 0.12) !important;--color-warning-1: #f26702 !important;--color-warning-2: #de5f07 !important;--color-warning-3: #ce590a !important;--color-warning-4: #c0540c !important;--color-warning-transparent-1: rgba(242, 103, 2, 0.48) !important;--color-warning-transparent-2: rgba(242, 103, 2, 0.24) !important;--color-warning-transparent-3: rgba(242, 103, 2, 0.12) !important;--color-positive-1: #000077 !important;--color-positive-2: #00008b !important;--color-positive-3: #00009f !important;--color-positive-4: #0000b2 !important;--color-positive-transparent-1: rgba(0, 0, 139, 0.48) !important;--color-positive-transparent-2: rgba(0, 0, 139, 0.24) !important;--color-positive-transparent-3: rgba(0, 0, 139, 0.12) !important;}.line-numbers {color: var(--color-primary-1) !important;}.jsx-3971054001.content, p, .jsx-4279741890 {background-color: var(--color-background-2) !important;color: #fff !important;}.jsx-3414412928 {background-color: var(--color-background-1) !important;}.toggle-bar {background-color: var(--color-foreground-2) !important;}.jsx-467725132 {background-color: var(--color-background-3) !important;}.jsx-2906438576, .jsx-986859180, .jsx-918008940 {background-color: var(--color-background-3) !important;}.interactive.jsx-2106077415:hover {border-color: var(--color-background-4) !important;}.jsx-3414412928.sidebar-layout-header-toggle-alert {background-color: var(--color-primary-1) !important;}`));if (target) {target.insertAdjacentHTML("afterend", `
Reflux
ON
`);} else {alert("Reflux badge could not be applied. This theme will run silently.");}head.appendChild(style);alert("Reflux is now running!");} else {alert("Reflux operation cancelled.");}}})(); -------------------------------------------------------------------------------- /themes/blueberry/theme.py: -------------------------------------------------------------------------------- 1 | import reflux 2 | 3 | t = reflux.Theme({ 4 | "name": "Blueberry", 5 | "author": "frissyn", 6 | "description": "Make your Repl IDE a blueberry color scheme!", 7 | "default": "dark" 8 | }) 9 | 10 | t.set_colors({ 11 | "border": "#00008b", 12 | 13 | "background-1": "#6495ed", 14 | "background-2": "#76a1ef", 15 | "background-3": "#87adf1", 16 | 17 | "primary-1": "#00008b", 18 | "primary-2": "#00009f", 19 | "primary-3": "#0000b2", 20 | "primary-4": "#0000c6", 21 | 22 | "positive-1": "#000077", 23 | "positive-2": "#00008b", 24 | "positive-3": "#00009f", 25 | "positive-4": "#0000b2", 26 | 27 | "foreground-1": "#590059", 28 | "foreground-2": "#450045", 29 | "foreground-3": "#320032", 30 | "foreground-4": "#1e001e", 31 | 32 | "positive-transparent-1": "rgba(0, 0, 139, 0.48)", 33 | "positive-transparent-2": "rgba(0, 0, 139, 0.24)", 34 | "positive-transparent-3": "rgba(0, 0, 139, 0.12)", 35 | }) 36 | 37 | t.build("themes/blueberry/theme.min.js") 38 | -------------------------------------------------------------------------------- /themes/cactus/cactus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frissyn/Reflux/99f05efaaf307cd8a9c0a44a8c2dc3d65e14d725/themes/cactus/cactus.png -------------------------------------------------------------------------------- /themes/cactus/theme.min.js: -------------------------------------------------------------------------------- 1 | javascript:(function() {let p1=document.getElementById("reflux-theme");let p2=document.getElementById("reflux-display");if (p1 && p2) {var go=confirm("There is a Reflux theme already running. Would you like to stop it?");if (go) {p1.remove();p2.remove();alert("This theme has been stopped.");} else {alert("This theme will continue running.");}} else {var go=confirm("Run this Reflux Theme?\n\nName: Cactus\nAuthor: frissyn\nDescription: Coding Cactus' trademark theme!");if (go) {var style=document.createElement("style");var head=document.getElementsByTagName("head")[0];var target=document.getElementsByClassName("jsx-2607100739")[0];style.setAttribute("id", "reflux-theme");style.appendChild(document.createTextNode(`.replit-ui-theme-root.dark{--color-background-1: #0f3f0f !important;--color-background-2: #0c2f0c !important;--color-background-3: #082008 !important;--color-control-1: #0c2f0c !important;--color-control-2: #103f10 !important;--color-control-3: #144f14 !important;--color-border: #32cd32 !important;--color-foreground-1: #cccccc !important;--color-foreground-2: #c2c2c2 !important;--color-foreground-3: #b8b8b8 !important;--color-foreground-4: #adadad !important;--color-foreground-transparent-1: rgba(14, 21, 37, 0.48) !important;--color-foreground-transparent-2: rgba(14, 21, 37, 0.24) !important;--color-foreground-transparent-3: rgba(14, 21, 37, 0.12) !important;--color-primary-1: #eb8100 !important;--color-primary-2: #d87600 !important;--color-primary-3: #c46c00 !important;--color-primary-4: #b16100 !important;--color-primary-transparent-1: rgba(52, 133, 228, 0.48) !important;--color-primary-transparent-2: rgba(52, 133, 228, 0.24) !important;--color-primary-transparent-3: rgba(52, 133, 228, 0.12) !important;--color-negative-1: #ff491c !important;--color-negative-2: #eb451b !important;--color-negative-3: #db411b !important;--color-negative-4: #cd3e1a !important;--color-negative-transparent-1: rgba(255, 73, 28, 0.48) !important;--color-negative-transparent-2: rgba(255, 73, 28, 0.24) !important;--color-negative-transparent-3: rgba(255, 73, 28, 0.12) !important;--color-warning-1: #f26702 !important;--color-warning-2: #de5f07 !important;--color-warning-3: #ce590a !important;--color-warning-4: #c0540c !important;--color-warning-transparent-1: rgba(242, 103, 2, 0.48) !important;--color-warning-transparent-2: rgba(242, 103, 2, 0.24) !important;--color-warning-transparent-3: rgba(242, 103, 2, 0.12) !important;--color-positive-1: #20ab46 !important;--color-positive-2: #219d41 !important;--color-positive-3: #22923d !important;--color-positive-4: #22883a !important;--color-positive-transparent-1: rgba(24, 204, 81, 0.48) !important;--color-positive-transparent-2: rgba(24, 204, 81, 0.24) !important;--color-positive-transparent-3: rgba(24, 204, 81, 0.12) !important;--color-background-4: #041004 !important;}.replit-ui-theme-root.light{--color-background-1: #0f3f0f !important;--color-background-2: #0c2f0c !important;--color-background-3: #082008 !important;--color-control-1: #0c2f0c !important;--color-control-2: #103f10 !important;--color-control-3: #144f14 !important;--color-border: #32cd32 !important;--color-foreground-1: #cccccc !important;--color-foreground-2: #c2c2c2 !important;--color-foreground-3: #b8b8b8 !important;--color-foreground-4: #adadad !important;--color-foreground-transparent-1: rgba(14, 21, 37, 0.48) !important;--color-foreground-transparent-2: rgba(14, 21, 37, 0.24) !important;--color-foreground-transparent-3: rgba(14, 21, 37, 0.12) !important;--color-primary-1: #eb8100 !important;--color-primary-2: #d87600 !important;--color-primary-3: #c46c00 !important;--color-primary-4: #b16100 !important;--color-primary-transparent-1: rgba(52, 133, 228, 0.48) !important;--color-primary-transparent-2: rgba(52, 133, 228, 0.24) !important;--color-primary-transparent-3: rgba(52, 133, 228, 0.12) !important;--color-negative-1: #ff491c !important;--color-negative-2: #eb451b !important;--color-negative-3: #db411b !important;--color-negative-4: #cd3e1a !important;--color-negative-transparent-1: rgba(255, 73, 28, 0.48) !important;--color-negative-transparent-2: rgba(255, 73, 28, 0.24) !important;--color-negative-transparent-3: rgba(255, 73, 28, 0.12) !important;--color-warning-1: #f26702 !important;--color-warning-2: #de5f07 !important;--color-warning-3: #ce590a !important;--color-warning-4: #c0540c !important;--color-warning-transparent-1: rgba(242, 103, 2, 0.48) !important;--color-warning-transparent-2: rgba(242, 103, 2, 0.24) !important;--color-warning-transparent-3: rgba(242, 103, 2, 0.12) !important;--color-positive-1: #20ab46 !important;--color-positive-2: #219d41 !important;--color-positive-3: #22923d !important;--color-positive-4: #22883a !important;--color-positive-transparent-1: rgba(24, 204, 81, 0.48) !important;--color-positive-transparent-2: rgba(24, 204, 81, 0.24) !important;--color-positive-transparent-3: rgba(24, 204, 81, 0.12) !important;--color-background-4: #041004 !important;}.line-numbers {color: var(--color-primary-1) !important;}.jsx-3971054001.content, p, .jsx-4279741890 {background-color: var(--color-background-2) !important;color: #fff !important;}.jsx-3414412928 {background-color: var(--color-background-1) !important;}.toggle-bar {background-color: var(--color-foreground-2) !important;}.jsx-467725132 {background-color: var(--color-background-3) !important;}.jsx-2906438576, .jsx-986859180, .jsx-918008940 {background-color: var(--color-background-3) !important;}.interactive.jsx-2106077415:hover {border-color: var(--color-background-4) !important;}.jsx-3414412928.sidebar-layout-header-toggle-alert {background-color: var(--color-primary-1) !important;}`));if (target) {target.insertAdjacentHTML("afterend", `
Reflux
ON
`);} else {alert("Reflux badge could not be applied. This theme will run silently.");}head.appendChild(style);alert("Reflux is now running!");} else {alert("Reflux operation cancelled.");}}})(); -------------------------------------------------------------------------------- /themes/cactus/theme.py: -------------------------------------------------------------------------------- 1 | import reflux 2 | 3 | t = reflux.Theme({ 4 | "name": "Cactus", 5 | "author": "frissyn", 6 | "description": "Coding Cactus' trademark theme!", 7 | "default": "dark" 8 | }) 9 | 10 | t.set_colors({ 11 | "border": "#32cd32", 12 | 13 | "control-1": "#0c2f0c", 14 | "control-2": "#103f10", 15 | "control-3": "#144f14", 16 | 17 | "foreground-1": "#cccccc", 18 | "foreground-2": "#c2c2c2", 19 | "foreground-3": "#b8b8b8", 20 | "foreground-4": "#adadad", 21 | 22 | "primary-1": "#eb8100", 23 | "primary-2": "#d87600", 24 | "primary-3": "#c46c00", 25 | "primary-4": "#b16100", 26 | 27 | "background-1": "#0f3f0f", 28 | "background-2": "#0c2f0c", 29 | "background-3": "#082008", 30 | "background-4": "#041004" 31 | }) 32 | 33 | t.build("themes/cactus/theme.min.js", "w+") 34 | -------------------------------------------------------------------------------- /themes/candyland/candyland.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frissyn/Reflux/99f05efaaf307cd8a9c0a44a8c2dc3d65e14d725/themes/candyland/candyland.png -------------------------------------------------------------------------------- /themes/candyland/theme.min.js: -------------------------------------------------------------------------------- 1 | javascript:(function() {let p1=document.getElementById("reflux-theme");let p2=document.getElementById("reflux-display");if (p1 && p2) {var go=confirm("There is a Reflux theme already running. Would you like to stop it?");if (go) {p1.remove();p2.remove();alert("This theme has been stopped.");} else {alert("This theme will continue running.");}} else {var go=confirm("Run this Reflux Theme?\n\nName: Candyland\nAuthor: frissyn\nDescription: Turn your Repl IDE into a candy wonderland!");if (go) {var style=document.createElement("style");var head=document.getElementsByTagName("head")[0];var target=document.getElementsByClassName("jsx-2607100739")[0];style.setAttribute("id", "reflux-theme");style.appendChild(document.createTextNode(`.replit-ui-theme-root.dark{--color-background-1: #ffc0cb !important;--color-background-2: #ffacbb !important;--color-background-3: #ff99ab !important;--color-control-1: #e0e0e0 !important;--color-control-2: #e9e9e9 !important;--color-control-3: #f3f3f3 !important;--color-border: #32cd32 !important;--color-foreground-1: #006400 !important;--color-foreground-2: #005000 !important;--color-foreground-3: #003d00 !important;--color-foreground-4: #002900 !important;--color-foreground-transparent-1: rgba(255, 255, 255, 0.48) !important;--color-foreground-transparent-2: rgba(255, 255, 255, 0.24) !important;--color-foreground-transparent-3: rgba(255, 255, 255, 0.12) !important;--color-primary-1: #ff1493 !important;--color-primary-2: #ff289c !important;--color-primary-3: #ff3ba5 !important;--color-primary-4: #ff4fae !important;--color-primary-transparent-1: rgba(52, 133, 228, 0.48) !important;--color-primary-transparent-2: rgba(52, 133, 228, 0.24) !important;--color-primary-transparent-3: rgba(52, 133, 228, 0.12) !important;--color-negative-1: #ff491c !important;--color-negative-2: #e9441b !important;--color-negative-3: #d8411b !important;--color-negative-4: #c93d1a !important;--color-negative-transparent-1: rgba(255, 73, 28, 0.48) !important;--color-negative-transparent-2: rgba(255, 73, 28, 0.24) !important;--color-negative-transparent-3: rgba(255, 73, 28, 0.12) !important;--color-warning-1: #eb6404 !important;--color-warning-2: #d65c08 !important;--color-warning-3: #c7560b !important;--color-warning-4: #b8510d !important;--color-warning-transparent-1: rgba(242, 103, 2, 0.48) !important;--color-warning-transparent-2: rgba(242, 103, 2, 0.24) !important;--color-warning-transparent-3: rgba(242, 103, 2, 0.12) !important;--color-positive-1: #ff1493 !important;--color-positive-2: #ff289c !important;--color-positive-3: #ff3ba5 !important;--color-positive-4: #ff4fae !important;--color-positive-transparent-1: rgba(255, 20, 147, 0.48) !important;--color-positive-transparent-2: rgba(255, 20, 147, 0.24) !important;--color-positive-transparent-3: rgba(255, 20, 147, 0.12) !important;}.replit-ui-theme-root.light{--color-background-1: #ffc0cb !important;--color-background-2: #ffacbb !important;--color-background-3: #ff99ab !important;--color-control-1: #e0e0e0 !important;--color-control-2: #e9e9e9 !important;--color-control-3: #f3f3f3 !important;--color-border: #32cd32 !important;--color-foreground-1: #006400 !important;--color-foreground-2: #005000 !important;--color-foreground-3: #003d00 !important;--color-foreground-4: #002900 !important;--color-foreground-transparent-1: rgba(255, 255, 255, 0.48) !important;--color-foreground-transparent-2: rgba(255, 255, 255, 0.24) !important;--color-foreground-transparent-3: rgba(255, 255, 255, 0.12) !important;--color-primary-1: #ff1493 !important;--color-primary-2: #ff289c !important;--color-primary-3: #ff3ba5 !important;--color-primary-4: #ff4fae !important;--color-primary-transparent-1: rgba(52, 133, 228, 0.48) !important;--color-primary-transparent-2: rgba(52, 133, 228, 0.24) !important;--color-primary-transparent-3: rgba(52, 133, 228, 0.12) !important;--color-negative-1: #ff491c !important;--color-negative-2: #e9441b !important;--color-negative-3: #d8411b !important;--color-negative-4: #c93d1a !important;--color-negative-transparent-1: rgba(255, 73, 28, 0.48) !important;--color-negative-transparent-2: rgba(255, 73, 28, 0.24) !important;--color-negative-transparent-3: rgba(255, 73, 28, 0.12) !important;--color-warning-1: #eb6404 !important;--color-warning-2: #d65c08 !important;--color-warning-3: #c7560b !important;--color-warning-4: #b8510d !important;--color-warning-transparent-1: rgba(242, 103, 2, 0.48) !important;--color-warning-transparent-2: rgba(242, 103, 2, 0.24) !important;--color-warning-transparent-3: rgba(242, 103, 2, 0.12) !important;--color-positive-1: #ff1493 !important;--color-positive-2: #ff289c !important;--color-positive-3: #ff3ba5 !important;--color-positive-4: #ff4fae !important;--color-positive-transparent-1: rgba(255, 20, 147, 0.48) !important;--color-positive-transparent-2: rgba(255, 20, 147, 0.24) !important;--color-positive-transparent-3: rgba(255, 20, 147, 0.12) !important;}.line-numbers {color: var(--color-primary-1) !important;}.jsx-3971054001.content, p, .jsx-4279741890 {background-color: var(--color-background-2) !important;color: #fff !important;}.jsx-3414412928 {background-color: var(--color-background-1) !important;}.toggle-bar {background-color: var(--color-foreground-2) !important;}.jsx-467725132 {background-color: var(--color-background-3) !important;}.jsx-2906438576, .jsx-986859180, .jsx-918008940 {background-color: var(--color-background-3) !important;}.interactive.jsx-2106077415:hover {border-color: var(--color-background-4) !important;}.jsx-3414412928.sidebar-layout-header-toggle-alert {background-color: var(--color-primary-1) !important;}`));if (target) {target.insertAdjacentHTML("afterend", `
Reflux
ON
`);} else {alert("Reflux badge could not be applied. This theme will run silently.");}head.appendChild(style);alert("Reflux is now running!");} else {alert("Reflux operation cancelled.");}}})(); -------------------------------------------------------------------------------- /themes/candyland/theme.py: -------------------------------------------------------------------------------- 1 | import reflux 2 | 3 | t = reflux.Theme({ 4 | "name": "Candyland", 5 | "author": "frissyn", 6 | "description": "Turn your Repl IDE into a candy wonderland!", 7 | "default": "light" 8 | }) 9 | 10 | t.set_colors({ 11 | "border": "#32cd32", 12 | 13 | "background-1": "#ffc0cb", 14 | "background-2": "#ffacbb", 15 | "background-3": "#ff99ab", 16 | 17 | "primary-1": "#ff1493", 18 | "primary-2": "#ff289c", 19 | "primary-3": "#ff3ba5", 20 | "primary-4": "#ff4fae", 21 | 22 | "positive-1": "#ff1493", 23 | "positive-2": "#ff289c", 24 | "positive-3": "#ff3ba5", 25 | "positive-4": "#ff4fae", 26 | 27 | "foreground-1": "#006400", 28 | "foreground-2": "#005000", 29 | "foreground-3": "#003d00", 30 | "foreground-4": "#002900", 31 | 32 | "positive-transparent-1": "rgba(255, 20, 147, 0.48)", 33 | "positive-transparent-2": "rgba(255, 20, 147, 0.24)", 34 | "positive-transparent-3": "rgba(255, 20, 147, 0.12)", 35 | }) 36 | 37 | t.build("themes/candyland/theme.min.js") 38 | -------------------------------------------------------------------------------- /themes/iris-flower/iris-flower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frissyn/Reflux/99f05efaaf307cd8a9c0a44a8c2dc3d65e14d725/themes/iris-flower/iris-flower.png -------------------------------------------------------------------------------- /themes/iris-flower/theme.min.js: -------------------------------------------------------------------------------- 1 | javascript:(function() {let p1=document.getElementById("reflux-theme");let p2=document.getElementById("reflux-display");if (p1 && p2) {var go=confirm("There is a Reflux theme already running. Would you like to stop it?");if (go) {p1.remove();p2.remove();alert("This theme has been stopped.");} else {alert("This theme will continue running.");}} else {var go=confirm("Run this Reflux Theme?\n\nName: Iris Flower\nAuthor: frissyn\nDescription: A dark mix of purple and yellow.");if (go) {var style=document.createElement("style");var head=document.getElementsByTagName("head")[0];var target=document.getElementsByClassName("jsx-2607100739")[0];style.setAttribute("id", "reflux-theme");style.appendChild(document.createTextNode(`.replit-ui-theme-root.dark{--color-background-1: #280551 !important;--color-background-2: #1f043e !important;--color-background-3: #16032c !important;--color-control-1: #461c6a !important;--color-control-2: #3c185b !important;--color-control-3: #32144b !important;--color-border: #7b16f0 !important;--color-foreground-1: #e1e2e4 !important;--color-foreground-2: #90939c !important;--color-foreground-3: #696d78 !important;--color-foreground-4: #4e525f !important;--color-foreground-transparent-1: rgba(14, 21, 37, 0.48) !important;--color-foreground-transparent-2: rgba(14, 21, 37, 0.24) !important;--color-foreground-transparent-3: rgba(14, 21, 37, 0.12) !important;--color-primary-1: #b98500 !important;--color-primary-2: #a57700 !important;--color-primary-3: #916900 !important;--color-primary-4: #7e5b00 !important;--color-primary-transparent-1: rgba(52, 133, 228, 0.48) !important;--color-primary-transparent-2: rgba(52, 133, 228, 0.24) !important;--color-primary-transparent-3: rgba(52, 133, 228, 0.12) !important;--color-negative-1: #ff491c !important;--color-negative-2: #eb451b !important;--color-negative-3: #db411b !important;--color-negative-4: #cd3e1a !important;--color-negative-transparent-1: rgba(255, 73, 28, 0.48) !important;--color-negative-transparent-2: rgba(255, 73, 28, 0.24) !important;--color-negative-transparent-3: rgba(255, 73, 28, 0.12) !important;--color-warning-1: #f26702 !important;--color-warning-2: #de5f07 !important;--color-warning-3: #ce590a !important;--color-warning-4: #c0540c !important;--color-warning-transparent-1: rgba(242, 103, 2, 0.48) !important;--color-warning-transparent-2: rgba(242, 103, 2, 0.24) !important;--color-warning-transparent-3: rgba(242, 103, 2, 0.12) !important;--color-positive-1: #20ab46 !important;--color-positive-2: #219d41 !important;--color-positive-3: #22923d !important;--color-positive-4: #22883a !important;--color-positive-transparent-1: rgba(24, 204, 81, 0.48) !important;--color-positive-transparent-2: rgba(24, 204, 81, 0.24) !important;--color-positive-transparent-3: rgba(24, 204, 81, 0.12) !important;--color-background-4: #0d0219 !important;}.replit-ui-theme-root.light{--color-background-1: #280551 !important;--color-background-2: #1f043e !important;--color-background-3: #16032c !important;--color-control-1: #461c6a !important;--color-control-2: #3c185b !important;--color-control-3: #32144b !important;--color-border: #7b16f0 !important;--color-foreground-1: #e1e2e4 !important;--color-foreground-2: #90939c !important;--color-foreground-3: #696d78 !important;--color-foreground-4: #4e525f !important;--color-foreground-transparent-1: rgba(14, 21, 37, 0.48) !important;--color-foreground-transparent-2: rgba(14, 21, 37, 0.24) !important;--color-foreground-transparent-3: rgba(14, 21, 37, 0.12) !important;--color-primary-1: #b98500 !important;--color-primary-2: #a57700 !important;--color-primary-3: #916900 !important;--color-primary-4: #7e5b00 !important;--color-primary-transparent-1: rgba(52, 133, 228, 0.48) !important;--color-primary-transparent-2: rgba(52, 133, 228, 0.24) !important;--color-primary-transparent-3: rgba(52, 133, 228, 0.12) !important;--color-negative-1: #ff491c !important;--color-negative-2: #eb451b !important;--color-negative-3: #db411b !important;--color-negative-4: #cd3e1a !important;--color-negative-transparent-1: rgba(255, 73, 28, 0.48) !important;--color-negative-transparent-2: rgba(255, 73, 28, 0.24) !important;--color-negative-transparent-3: rgba(255, 73, 28, 0.12) !important;--color-warning-1: #f26702 !important;--color-warning-2: #de5f07 !important;--color-warning-3: #ce590a !important;--color-warning-4: #c0540c !important;--color-warning-transparent-1: rgba(242, 103, 2, 0.48) !important;--color-warning-transparent-2: rgba(242, 103, 2, 0.24) !important;--color-warning-transparent-3: rgba(242, 103, 2, 0.12) !important;--color-positive-1: #20ab46 !important;--color-positive-2: #219d41 !important;--color-positive-3: #22923d !important;--color-positive-4: #22883a !important;--color-positive-transparent-1: rgba(24, 204, 81, 0.48) !important;--color-positive-transparent-2: rgba(24, 204, 81, 0.24) !important;--color-positive-transparent-3: rgba(24, 204, 81, 0.12) !important;--color-background-4: #0d0219 !important;}.line-numbers {color: var(--color-primary-1) !important;}.jsx-3971054001.content, p, .jsx-4279741890 {background-color: var(--color-background-2) !important;color: #fff !important;}.jsx-3414412928 {background-color: var(--color-background-1) !important;}.toggle-bar {background-color: var(--color-foreground-2) !important;}.jsx-467725132 {background-color: var(--color-background-3) !important;}.jsx-2906438576, .jsx-986859180, .jsx-918008940 {background-color: var(--color-background-3) !important;}.interactive.jsx-2106077415:hover {border-color: var(--color-background-4) !important;}.jsx-3414412928.sidebar-layout-header-toggle-alert {background-color: var(--color-primary-1) !important;}`));if (target) {target.insertAdjacentHTML("afterend", `
Reflux
ON
`);} else {alert("Reflux badge could not be applied. This theme will run silently.");}head.appendChild(style);alert("Reflux is now running!");} else {alert("Reflux operation cancelled.");}}})(); -------------------------------------------------------------------------------- /themes/iris-flower/theme.py: -------------------------------------------------------------------------------- 1 | import reflux 2 | 3 | t = reflux.Theme({ 4 | "name": "Iris Flower", 5 | "author": "frissyn", 6 | "description": "A dark mix of purple and yellow.", 7 | "default": "dark" 8 | }) 9 | 10 | t.set_colors({ 11 | "border": "#7b16f0", 12 | 13 | "control-1": "#461c6a", 14 | "control-2": "#3c185b", 15 | "control-3": "#32144b", 16 | 17 | "primary-1": "#b98500", 18 | "primary-2": "#a57700", 19 | "primary-3": "#916900", 20 | "primary-4": "#7e5b00", 21 | 22 | "background-1": "#280551", 23 | "background-2": "#1f043e", 24 | "background-3": "#16032c", 25 | "background-4": "#0d0219" 26 | }) 27 | 28 | t.build("themes/iris-flower/theme.min.js", "w+") -------------------------------------------------------------------------------- /themes/jett-black/jett-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frissyn/Reflux/99f05efaaf307cd8a9c0a44a8c2dc3d65e14d725/themes/jett-black/jett-black.png -------------------------------------------------------------------------------- /themes/jett-black/theme.min.js: -------------------------------------------------------------------------------- 1 | javascript:(function() {let p1=document.getElementById("reflux-theme");let p2=document.getElementById("reflux-display");if (p1 && p2) {var go=confirm("There is a Reflux theme already running. Would you like to stop it?");if (go) {p1.remove();p2.remove();alert("This theme has been stopped.");} else {alert("This theme will continue running.");}} else {var go=confirm("Run this Reflux Theme?\n\nName: Jett-Black\nAuthor: frissyn\nDescription: Lights out >:)");if (go) {var style=document.createElement("style");var head=document.getElementsByTagName("head")[0];var target=document.getElementsByClassName("jsx-2607100739")[0];style.setAttribute("id", "reflux-theme");style.appendChild(document.createTextNode(`.replit-ui-theme-root.dark{--color-background-1: #1d2333 !important;--color-background-2: #171d2d !important;--color-background-3: #0e1525 !important;--color-control-1: #313646 !important;--color-control-2: #2b3140 !important;--color-control-3: #262b3b !important;--color-border: #313646 !important;--color-foreground-1: #e1e2e4 !important;--color-foreground-2: #90939c !important;--color-foreground-3: #696d78 !important;--color-foreground-4: #4e525f !important;--color-foreground-transparent-1: rgba(14, 21, 37, 0.48) !important;--color-foreground-transparent-2: rgba(14, 21, 37, 0.24) !important;--color-foreground-transparent-3: rgba(14, 21, 37, 0.12) !important;--color-primary-1: #3485e4 !important;--color-primary-2: #337bd2 !important;--color-primary-3: #3273c4 !important;--color-primary-4: #316cb8 !important;--color-primary-transparent-1: rgba(52, 133, 228, 0.48) !important;--color-primary-transparent-2: rgba(52, 133, 228, 0.24) !important;--color-primary-transparent-3: rgba(52, 133, 228, 0.12) !important;--color-negative-1: #ff491c !important;--color-negative-2: #eb451b !important;--color-negative-3: #db411b !important;--color-negative-4: #cd3e1a !important;--color-negative-transparent-1: rgba(255, 73, 28, 0.48) !important;--color-negative-transparent-2: rgba(255, 73, 28, 0.24) !important;--color-negative-transparent-3: rgba(255, 73, 28, 0.12) !important;--color-warning-1: #f26702 !important;--color-warning-2: #de5f07 !important;--color-warning-3: #ce590a !important;--color-warning-4: #c0540c !important;--color-warning-transparent-1: rgba(242, 103, 2, 0.48) !important;--color-warning-transparent-2: rgba(242, 103, 2, 0.24) !important;--color-warning-transparent-3: rgba(242, 103, 2, 0.12) !important;--color-positive-1: #20ab46 !important;--color-positive-2: #219d41 !important;--color-positive-3: #22923d !important;--color-positive-4: #22883a !important;--color-positive-transparent-1: rgba(24, 204, 81, 0.48) !important;--color-positive-transparent-2: rgba(24, 204, 81, 0.24) !important;--color-positive-transparent-3: rgba(24, 204, 81, 0.12) !important;}.replit-ui-theme-root.light{--color-background-1: #1d2333 !important;--color-background-2: #171d2d !important;--color-background-3: #0e1525 !important;--color-control-1: #313646 !important;--color-control-2: #2b3140 !important;--color-control-3: #262b3b !important;--color-border: #313646 !important;--color-foreground-1: #e1e2e4 !important;--color-foreground-2: #90939c !important;--color-foreground-3: #696d78 !important;--color-foreground-4: #4e525f !important;--color-foreground-transparent-1: rgba(14, 21, 37, 0.48) !important;--color-foreground-transparent-2: rgba(14, 21, 37, 0.24) !important;--color-foreground-transparent-3: rgba(14, 21, 37, 0.12) !important;--color-primary-1: #3485e4 !important;--color-primary-2: #337bd2 !important;--color-primary-3: #3273c4 !important;--color-primary-4: #316cb8 !important;--color-primary-transparent-1: rgba(52, 133, 228, 0.48) !important;--color-primary-transparent-2: rgba(52, 133, 228, 0.24) !important;--color-primary-transparent-3: rgba(52, 133, 228, 0.12) !important;--color-negative-1: #ff491c !important;--color-negative-2: #eb451b !important;--color-negative-3: #db411b !important;--color-negative-4: #cd3e1a !important;--color-negative-transparent-1: rgba(255, 73, 28, 0.48) !important;--color-negative-transparent-2: rgba(255, 73, 28, 0.24) !important;--color-negative-transparent-3: rgba(255, 73, 28, 0.12) !important;--color-warning-1: #f26702 !important;--color-warning-2: #de5f07 !important;--color-warning-3: #ce590a !important;--color-warning-4: #c0540c !important;--color-warning-transparent-1: rgba(242, 103, 2, 0.48) !important;--color-warning-transparent-2: rgba(242, 103, 2, 0.24) !important;--color-warning-transparent-3: rgba(242, 103, 2, 0.12) !important;--color-positive-1: #20ab46 !important;--color-positive-2: #219d41 !important;--color-positive-3: #22923d !important;--color-positive-4: #22883a !important;--color-positive-transparent-1: rgba(24, 204, 81, 0.48) !important;--color-positive-transparent-2: rgba(24, 204, 81, 0.24) !important;--color-positive-transparent-3: rgba(24, 204, 81, 0.12) !important;}.line-numbers {color: var(--color-primary-1) !important;}.jsx-3971054001.content, p, .jsx-4279741890 {background-color: var(--color-background-2) !important;color: #fff !important;}.jsx-3414412928 {background-color: var(--color-background-1) !important;}.toggle-bar {background-color: var(--color-foreground-2) !important;}.jsx-467725132 {background-color: var(--color-background-3) !important;}.jsx-2906438576, .jsx-986859180, .jsx-918008940 {background-color: var(--color-background-3) !important;}.interactive.jsx-2106077415:hover {border-color: var(--color-background-4) !important;}.jsx-3414412928.sidebar-layout-header-toggle-alert {background-color: var(--color-primary-1) !important;}`));if (target) {target.insertAdjacentHTML("afterend", `
Reflux
ON
`);} else {alert("Reflux badge could not be applied. This theme will run silently.");}head.appendChild(style);alert("Reflux is now running!");} else {alert("Reflux operation cancelled.");}}})(); -------------------------------------------------------------------------------- /themes/jett-black/theme.py: -------------------------------------------------------------------------------- 1 | import reflux 2 | 3 | from reflux.values import COLORS 4 | 5 | t = reflux.Theme({ 6 | "name": "Jett-Black", 7 | "author": "frissyn", 8 | "description": "Lights out >:)", 9 | "default": "dark" 10 | }) 11 | 12 | for n, v in COLORS["dark"].items(): 13 | t.set_color(n, "black") 14 | 15 | t.build("themes/jett-black/theme.min.js") 16 | --------------------------------------------------------------------------------