PHPackages                             nikhilbhatia22/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. nikhilbhatia22/laravel-validator-color

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

nikhilbhatia22/laravel-validator-color
======================================

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

v11.0.0(1y ago)132.1k—3.2%3MITPHPPHP ^5.5.9|^7.0|^8.0|^8.1|^8.2|^8.3

Since May 11Pushed 1y agoCompare

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

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

Validate colors with Laravel 5 and above
========================================

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

[![Latest Version](https://camo.githubusercontent.com/3e9ea483243978221fb209f9bac2e9226b3488f5f26d3269bfcdcf8a93b46584/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6e696b68696c62686174696132322f6c61726176656c2d76616c696461746f722d636f6c6f72)](https://github.com/nikhilbhatia22/laravel-validator-color/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![For Laravel 5](https://camo.githubusercontent.com/73ec34da32f51239b5b4061cd2a8f06852c59726d5ec122281067f4c04b3475a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d352e78253743362e78253743372e782d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](https://github.com/nikhilbhatia22/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 nikhilbhatia22/laravel-validator-color
```

For Laravel version below 5.5, add the following to the `providers` array in your `config/app.php`

```
Nikhilbhatia22\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

45

—

FairBetter than 91% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~235 days

Recently: every ~382 days

Total

14

Last Release

643d ago

Major Versions

3.0.2 → v4.0.02020-05-20

v4.0.4 → v5.0.02021-04-18

v5.0.0 → v6.0.02022-07-05

v6.0.0 → v7.0.02023-03-03

v7.0.0 → v11.0.02024-09-30

PHP version history (5 changes)1.0.0PHP ^5.5.9|^7.0

v5.0.0PHP ^7.3|^8.0

v6.0.0PHP ^5.5.9|^7.0|^8.0

v7.0.0PHP ^5.5.9|^7.0|^8.0|^8.1

v11.0.0PHP ^5.5.9|^7.0|^8.0|^8.1|^8.2|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b1daa0196847bc20e4204386f1d7c160d9ec376f1f4be9ac6b7268479e612c0?d=identicon)[nikhilbhatia22](/maintainers/nikhilbhatia22)

---

Top Contributors

[![nikhilbhatia22](https://avatars.githubusercontent.com/u/12022338?v=4)](https://github.com/nikhilbhatia22 "nikhilbhatia22 (14 commits)")[![tylercd100](https://avatars.githubusercontent.com/u/4522226?v=4)](https://github.com/tylercd100 "tylercd100 (12 commits)")[![purveshclone](https://avatars.githubusercontent.com/u/63946969?v=4)](https://github.com/purveshclone "purveshclone (8 commits)")[![claretnnamocha](https://avatars.githubusercontent.com/u/43606892?v=4)](https://github.com/claretnnamocha "claretnnamocha (1 commits)")[![granthik-iappsolution](https://avatars.githubusercontent.com/u/159107660?v=4)](https://github.com/granthik-iappsolution "granthik-iappsolution (1 commits)")[![simi41098](https://avatars.githubusercontent.com/u/88364545?v=4)](https://github.com/simi41098 "simi41098 (1 commits)")

---

Tags

laravelvalidatorcolornikhilbhatia22

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[sunspikes/clamav-validator

Custom Laravel anti-virus validator for file uploads using ClamAV.

3722.1M6](/packages/sunspikes-clamav-validator)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2462.4M7](/packages/laravel-validation-rules-credit-card)[proengsoft/laravel-jsvalidation

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

1.1k2.4M50](/packages/proengsoft-laravel-jsvalidation)

PHPackages © 2026

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