PHPackages                             tylercd100/laravel-validator-color - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. tylercd100/laravel-validator-color

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

tylercd100/laravel-validator-color
==================================

Validate that a certain value is a valid CSS color string in Laravel 5

3.0.2(9y ago)1580.1k↑200%24[1 issues](https://github.com/tylercd100/laravel-validator-color/issues)[1 PRs](https://github.com/tylercd100/laravel-validator-color/pulls)MITPHPPHP ^5.5.9|^7.0CI failing

Since May 11Pushed 5y ago4 watchersCompare

[ Source](https://github.com/tylercd100/laravel-validator-color)[ Packagist](https://packagist.org/packages/tylercd100/laravel-validator-color)[ Docs](https://github.com/tylercd100/laravel-validator-color)[ RSS](/packages/tylercd100-laravel-validator-color/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

Validate colors with Laravel 5
==============================

[](#validate-colors-with-laravel-5)

[![Latest Version](https://camo.githubusercontent.com/9bfdb9fbabf70bf5b5a6e2f60b9bc2846db7761fb85c20775e95fac4a0458d2e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f74796c657263643130302f6c61726176656c2d76616c696461746f722d636f6c6f722e7376673f7374796c653d666c61742d737175617265)](https://github.com/tylercd100/laravel-validator-color/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/483802f40587a62ef0513e58e626d7ac0553c8dcc74b17b291005d50d932bc7d/68747470733a2f2f7472617669732d63692e6f72672f74796c657263643130302f6c61726176656c2d76616c696461746f722d636f6c6f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tylercd100/laravel-validator-color)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7d80b1fffeb4e0e5334815ad5cd3d64c32f59851862474e5c4547f8fb1b905df/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74796c657263643130302f6c61726176656c2d76616c696461746f722d636f6c6f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tylercd100/laravel-validator-color/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/899d91835ed59bbbb2eb921b356c9582b15c459bfad46d87b4ec4e73a684d1e4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74796c657263643130302f6c61726176656c2d76616c696461746f722d636f6c6f722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tylercd100/laravel-validator-color/?branch=master)[![Dependency Status](https://camo.githubusercontent.com/1c4ac926efb90f2924bb989040a5bf7eedb5476ed59563195a7d1ed8141ed7fb/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3536663332353263333536333065303032396462303138372f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/56f3252c35630e0029db0187)[![Total Downloads](https://camo.githubusercontent.com/c0c1c199f472c9828c6b9b8344e851c1107f521d1e1dd29b474f7cf71a8de7b8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74796c657263643130302f6c61726176656c2d76616c696461746f722d636f6c6f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tylercd100/laravel-validator-color)

This package will let you validate that a certain value is a valid CSS color string.

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

[](#installation)

Install via [composer](https://getcomposer.org/) - In the terminal:

```
composer require tylercd100/laravel-validator-color
```

Now add the following to the `providers` array in your `config/app.php`

```
Tylercd100\Validator\Color\ServiceProvider::class
```

Usage
-----

[](#usage)

```
// Test any color type
Validator::make(['test' => '#454ACF'], ['test' => 'color']);

// Test for rgb
Validator::make(['test' => 'rgb(0, 200, 150)'], ['test' => 'color_rgb']);

// Test for rgba
Validator::make(['test' => 'rgba(0, 200, 150, 0.52)'], ['test' => 'color_rgba']);

// Test for hex
Validator::make(['test' => '#333'], ['test' => 'color_hex']);

// Test for css color keyword
Validator::make(['test' => 'gold'], ['test' => 'color_keyword']);
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 82.4% 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

Every ~86 days

Total

5

Last Release

3315d ago

Major Versions

1.0.0 → 2.0.02017-04-19

2.0.0 → 3.0.02017-04-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d0f17a08e8038aafdd451317206dda9429dfda2c7cbadb0c0796e25367108d5?d=identicon)[tylercd100](/maintainers/tylercd100)

---

Top Contributors

[![tylercd100](https://avatars.githubusercontent.com/u/4522226?v=4)](https://github.com/tylercd100 "tylercd100 (14 commits)")[![claretnnamocha](https://avatars.githubusercontent.com/u/43606892?v=4)](https://github.com/claretnnamocha "claretnnamocha (1 commits)")[![jkudish](https://avatars.githubusercontent.com/u/260253?v=4)](https://github.com/jkudish "jkudish (1 commits)")[![valentindiancu](https://avatars.githubusercontent.com/u/20146970?v=4)](https://github.com/valentindiancu "valentindiancu (1 commits)")

---

Tags

laravelvalidatorcolortylercd100

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tylercd100-laravel-validator-color/health.svg)

```
[![Health](https://phpackages.com/badges/tylercd100-laravel-validator-color/health.svg)](https://phpackages.com/packages/tylercd100-laravel-validator-color)
```

###  Alternatives

[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[sunspikes/clamav-validator

Custom Laravel 5 anti-virus validator for file uploads.

3651.8M3](/packages/sunspikes-clamav-validator)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[laravel-validation-rules/phone

Validate that a phone number is in the correct format

69355.5k](/packages/laravel-validation-rules-phone)[illuminatech/validation-composite

Allows uniting several validation rules into a single one for easy re-usage

184485.5k](/packages/illuminatech-validation-composite)

PHPackages © 2026

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