0.1.2 • Published 8 months ago

hcv-season v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

HDV-Season

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");