PHPackages                             watson/colortime - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. watson/colortime

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

watson/colortime
================

See time as color.

1.0.0(10y ago)3121MITPHPPHP &gt;=5.3.0

Since Sep 25Pushed 10y ago1 watchersCompare

[ Source](https://github.com/dwightwatson/colortime)[ Packagist](https://packagist.org/packages/watson/colortime)[ RSS](/packages/watson-colortime/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

ColorTime
=========

[](#colortime)

[![Build Status](https://camo.githubusercontent.com/c0121cfccf11ca28325adefacfe0691ed681a9edf3328b36c952eeefd22f39cf/68747470733a2f2f7472617669732d63692e6f72672f647769676874776174736f6e2f636f6c6f7274696d652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dwightwatson/colortime)[![Dependency Status](https://camo.githubusercontent.com/06ca325d8c060dfcd7fc59651d4ac9f1340091951ec8fdae7a4692b496c40b22/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f776174736f6e3a636f6c6f7274696d652f312e302e302f62616467652e737667)](https://www.versioneye.com/php/watson:colortime/1.0.0)[![Total Downloads](https://camo.githubusercontent.com/a00932a7de381af1620ff23f0efa328a9e40146ef0216bfbe79eb410fbe9030b/68747470733a2f2f706f7365722e707567782e6f72672f776174736f6e2f636f6c6f7274696d652f646f776e6c6f6164732e737667)](https://packagist.org/packages/watson/colortime)[![Latest Stable Version](https://camo.githubusercontent.com/faf67e61b9d2847c69fa25434418d8caba616027b9d9e2230d4136c3ffa0b5ff/68747470733a2f2f706f7365722e707567782e6f72672f776174736f6e2f636f6c6f7274696d652f762f737461626c652e737667)](https://packagist.org/packages/watson/colortime)[![Latest Unstable Version](https://camo.githubusercontent.com/d16fbdc7da22a0afe91dae35d531fe1e7b5cc14803ee6eaef42186bed46ed884/68747470733a2f2f706f7365722e707567782e6f72672f776174736f6e2f636f6c6f7274696d652f762f756e737461626c652e737667)](https://packagist.org/packages/watson/colortime)[![License](https://camo.githubusercontent.com/96f3b8af52a82d9a5881233a70791f62310a26b8c6fd86e5619b100109d78771/68747470733a2f2f706f7365722e707567782e6f72672f776174736f6e2f636f6c6f7274696d652f6c6963656e73652e737667)](https://packagist.org/packages/watson/colortime)

Get time as a hexadecimal color, like [the color clock](http://www.jacopocolo.com/hexclock/).

For example, 10:10:10 AM will have a hex value of #101010.

Installation
------------

[](#installation)

Easy, use Composer! If you're yet to be enlightened by dependency management or like a challenge, copy the code in manually.

```
composer require "watson/colortime"
```

Usage
-----

[](#usage)

Create a new instance and pass in the `DateTime` instance you want to use, or use the factory to get an instance for right now.

```
// Using a specific time.
$datTime = DateTime::createFromFormat('H:i:s', '10:10:10');

$colorTime = new \Watson\ColorTime\ColorTime($dateTime);

// Using the current time (you could also pass a DateTime instance to the factory if you so desired).
$colorTime = \Watson\ColorTime\ColorTime::make();
```

To get the time as a hex value, simply call the `hex()` method.

```
$hex = $colorTime->hex(); // '#101010'
```

Spellcheck
----------

[](#spellcheck)

If you'd rather spell colour correctly, simply subclass the `ColorTime` instance into your own application and use that instead.

This is just a joke, don't do this. Unless you want to, in which case feel free.

```
class ColourTime extends \Watson\ColorTime\ColorTime {}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3889d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1100408?v=4)[Dwight Watson](/maintainers/dwightwatson)[@dwightwatson](https://github.com/dwightwatson)

---

Top Contributors

[![dwightwatson](https://avatars.githubusercontent.com/u/1100408?v=4)](https://github.com/dwightwatson "dwightwatson (3 commits)")

---

Tags

clockdatetimecolor

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/watson-colortime/health.svg)

```
[![Health](https://phpackages.com/badges/watson-colortime/health.svg)](https://phpackages.com/packages/watson-colortime)
```

###  Alternatives

[nette/utils

🛠 Nette Utils: lightweight utilities for string &amp; array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.

2.1k394.3M1.5k](/packages/nette-utils)[symfony/clock

Decouples applications from the system clock

431168.9M205](/packages/symfony-clock)[league/period

Time range API for PHP

7335.4M21](/packages/league-period)[spatie/color

A little library to handle color conversions

38118.9M28](/packages/spatie-color)[mexitek/phpcolors

A series of methods that let you manipulate colors. Just incase you ever need different shades of one color on the fly.

5003.6M18](/packages/mexitek-phpcolors)[brick/date-time

Date and time library

3623.3M61](/packages/brick-date-time)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
