Skip to content

DevTomUK/colorTime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Color Time

Color Time uses a simple javascript function to convert the current time in to an RGB value, then applies it to a variable, which can be used to style any element properties by using a class name.

By splitting the color values down to segments of time for every 100 milliseconds, this ensures a smooth transition in color.

The function is completed every 100ms to update the style.

Instructions:

To use this color changing variable, copy the script "colortime.js" in to your source folder.

Add the script in to your project with <script src="colortime.js"></script>.

Use the class "colorTime" on the element you want it applied to. (see div below for example).

To change the name of the class you want to use or the property of the element, change them on the first section of the colortime.js code

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published