Skip to content

Navides/HCV-Season

Repository files navigation

HDV-Season

‘‘ Developers stay home and then forget the season.

A random president


Summary

HCV-Season is a library provides color changes according to season, like red as summar, blue as winter, brown as autumn, green as spring. Seasonal colors are customizable.

Installation

npm i hcv-season

Usage

Page alteration

// reflect current season to page
const season = require("hcv-season");
const props = [ "background-color",  "border-color", "color" ];
const config = { today: new Date(), impact: 0.1 };
season.reflectToPage(props, config);

Element alteration

// reflect current season to single element
const ele = document.getElementById("something");
const season = require("hcv-season");
const props = [ "background-color",  "border-color", "color" ];
const config = { today: new Date(), impact: 0.1 };
season.reflectToElement(ele, props, config);

Color alteration

// reflect current season to color
const season = require("hcv-season");
const config = { today: new Date(), impact: 0.1 };
const color = season.getReflectionColor("#333333");

About

A tool to bring season to web pages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published