daily-color v2.3.2
daily-color
Provides a unique hex code each day
Install
Install from npmjs.com/package/daily-color:
npm install daily-color
Use
In a JavaScript/TypeScript project, using NPM:
import { getDailyColor } from "daily-color";
console.log("Today's color is:", getDailyColor());
console.log("Another day's color is:", getDailyColor(new Date("2024-11-09")));
Directly loading the bundled JavaScript, for static projects not using NPM:
<script type="module">
import { getDailyColor } from "https://www.aimeerivers.com/daily-color/dist/daily-color.js";
console.log("Today's color is:", getDailyColor());
console.log("Another day's color is:", getDailyColor(new Date("2024-11-09")));
</script>
Using the CLI:
dailycolor
Just want to see today's color?
There is a demo on www.aimeerivers.com/daily-color
Want to see a particular date? No problem, just add a date
parameter, for example www.aimeerivers.com/daily-color/?date=2025-01-29
And if you want to see the coming colors for the next month you can see them on www.aimeerivers.com/daily-color/month
Development
Install dependencies:
npm install
Run tests:
npm run test
Compile the dist code, for projects without NPM:
npm run webpack
The project uses ESLint and Prettier to ensure consistent coding standards.
npm run lint
npm run format
npm run package:lint
lint
will check for errors and fix formatting in.ts
and.js
files.format
will apply format rules to all possible files.package:lint
will warn of any inconsistencies in thepackage.json
file.
6 months ago
7 months ago
8 months ago
8 months ago
9 months ago
10 months ago
10 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago