Giter VIP home page Giter VIP logo

rgb-hex-clock's Introduction

RGB (Hexidecimal) Clock

A dynamic RGB clock that changes its background color based on the current time. The project also updates the webpage's favicon to match the background color. This serves as a simple and visually appealing example of using JavaScript to manipulate the DOM and create dynamic content. Iterates from #000000 to #FFFFFF resetting at 00:00, daily.

Features

  • Dynamic Background Color: The background color changes based on the current time, creating a visually dynamic experience.
  • Favicon Color Matching: The favicon programmatically matches the background color for a cohesive design.

Demo GIF

RGB Clock Demo

Getting Started

Usage

  1. Clone the repository:

    git clone https://github.com/noahsamoa/rgb-hex-clock.git
    cd rgb-clock
  2. Open index.html in your preferred web browser.

  3. Observe the dynamic changes in background color and favicon.

Notes

Since there are 16,777,216 RGB values and only 86,400 seconds per day, we will be skipping about 193 of the possible values in that second.

Additionally, the hexidecimal plot is not in color spectrum order, so the colors may bounce around. The text is the interpolation of the background color. To view the clock in a gradient of color, the HSL spectrum would have to be used, but plotting a three-dimensional color set in one dimension is impossible to do with spectrum linearity.

A sister project will be released, iterating on the same logic, but with the hue range in HSL raising throughout the day. This would give the perception of certain hours as certain colors.

Contributing

Contributions are welcome! If you have any ideas, bug fixes, or improvements, feel free to open an issue or create a pull request.

rgb-hex-clock's People

Contributors

noahsamoa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.