0.1.5 • Published 8 months ago

hcv-daylight v0.1.5

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

HDV-Daylight

Summary

HCV-Daylight provides color changes according to time of day, like bright in the morning, dark at night. Seasonal colors are customizable.

Installation

npm i hcv-daylight

Usage

Page alteration

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

Element alteration

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

Color alteration

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

8 months ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago