This project allows you to transition your desktop wallpaper color smoothly over a specified duration. You can specify a color to transition to immediately or provide a schedule of colors and times of day for automatic transitions.
- Transition to a specified color immediately.
- Schedule color transitions based on the time of day.
- Smoothly transition between colors over a specified duration.
- Random color transitions if no color or schedule is provided.
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Install the dependencies:
npm install
To transition to a specified color immediately, use the --color
option:
node main.js --color "#ff00ff"
To schedule color transitions based on the time of day, provide a schedule file using the --scheduleFile
option. The schedule file should be a JSON file with an array of objects, each containing an hour
(0-23) and a color
(hex code).
Example schedule.json
:
[
{ "hour": 8, "color": "#ff00ff" },
{ "hour": 11, "color": "#00ff00" },
{ "hour": 14, "color": "#0000ff" }
]
Run the script with the schedule file:
node main.js --scheduleFile schedule.json
If no color or schedule is provided, the script will transition between two random colors:
node main.js
main.js
: The main entry point of the application.colorUtils.js
: Utility functions for color conversion and interpolation.imageUtils.js
: Utility functions for creating solid color images.wallpaperUtils.js
: Functions for transitioning the wallpaper color and reading/writing the current color.
-
Create a new branch for your feature:
git checkout -b feature-name
-
Make your changes and commit them:
git commit -m "Add feature description"
-
Push your branch and create a pull request:
git push origin feature-name
This project is licensed under the MIT License. See the LICENSE file for details.