PHPackages                             w4msolutions/yii2-widget-colorinput - 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. w4msolutions/yii2-widget-colorinput

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

w4msolutions/yii2-widget-colorinput
===================================

An enhanced Yii 2 widget encapsulating the HTML 5 color input (sub repo split from yii2-widgets)

2.0.0(3mo ago)01[1 PRs](https://github.com/W4MSOLUTIONS/yii2-widget-colorinput/pulls)BSD-3-ClauseJavaScript

Since Apr 9Pushed 3mo agoCompare

[ Source](https://github.com/W4MSOLUTIONS/yii2-widget-colorinput)[ Packagist](https://packagist.org/packages/w4msolutions/yii2-widget-colorinput)[ Docs](https://github.com/W4MSOLUTIONS/yii2-widget-colorinput)[ RSS](/packages/w4msolutions-yii2-widget-colorinput/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

yii2-widget-colorinput
======================

[](#yii2-widget-colorinput)

Color input forked from

Released under w4msolutions namespace for providing latest dev-master as tags 2.x

The ColorInput widget is an advanced ColorPicker input styled for Bootstrap. It uses a combination of the HTML5 color input and/or the [JQuery Spectrum Plugin](http://bgrins.github.io/spectrum) for rendering the color picker. You can use the Native HTML5 color input by setting the `useNative` option to `true`. Else, the Spectrum plugin polyfills for unsupported browser versions.

- Specially styled for Bootstrap 3.x and 4.x with customizable caption showing the output of the control.
- Ability to prepend and append addons.
- Allow the input to be changed both via the control or the text box.
- The Spectrum plugin automatically polyfills the `HTML5 color input` for unsupported browser versions.

> NOTE: This extension is a sub repo split of [yii2-widgets](https://github.com/kartik-v/yii2-widgets). The split has been done since 08-Nov-2014 to allow developers to install this specific widget in isolation if needed. One can also use the extension the previous way with the whole suite of [yii2-widgets](http://demos.krajee.com/widgets).

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/). Check the [composer.json](https://github.com/kartik-v/yii2-widget-colorinput/blob/master/composer.json) for this extension's requirements and dependencies. Read this [web tip /wiki](http://webtips.krajee.com/setting-composer-minimum-stability-application/) on setting the `minimum-stability` settings for your application's composer.json.

To install, either run

```
$ php composer.phar require kartik-v/yii2-widget-colorinput "*"

```

or add

```
"kartik-v/yii2-widget-colorinput": "*"

```

to the `require` section of your `composer.json` file.

Release Updates
---------------

[](#release-updates)

> NOTE: Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-widget-colorinput/blob/master/CHANGE.md) for details on release wise changes.

Demo
----

[](#demo)

You can refer detailed [documentation and demos](http://demos.krajee.com/widget-details/colorinput) on usage of the extension.

Usage
-----

[](#usage)

```
use w4msolutions\color\ColorInput;

// Usage with ActiveForm and model
echo $form->field($model, 'color')->widget(ColorInput::classname(), [
    'options' => ['placeholder' => 'Select color ...'],
]);

// With model & without ActiveForm
echo 'Select Color';
echo ColorInput::widget([
    'model' => $model,
    'attribute' => 'saturation',
]);
```

License
-------

[](#license)

**yii2-widget-colorinput** is released under the BSD-3-Clause License. See the bundled `LICENSE.md` for details.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance80

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

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

106d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/170144652?v=4)[W4MSOLUTIONS](/maintainers/W4MSOLUTIONS)[@W4MSOLUTIONS](https://github.com/W4MSOLUTIONS)

---

Top Contributors

[![kartik-v](https://avatars.githubusercontent.com/u/3592619?v=4)](https://github.com/kartik-v "kartik-v (42 commits)")[![dogrocker](https://avatars.githubusercontent.com/u/8379027?v=4)](https://github.com/dogrocker "dogrocker (2 commits)")[![32felix](https://avatars.githubusercontent.com/u/15777140?v=4)](https://github.com/32felix "32felix (2 commits)")[![memboc](https://avatars.githubusercontent.com/u/7403119?v=4)](https://github.com/memboc "memboc (2 commits)")[![noffily](https://avatars.githubusercontent.com/u/10633300?v=4)](https://github.com/noffily "noffily (2 commits)")[![iamguba](https://avatars.githubusercontent.com/u/14358417?v=4)](https://github.com/iamguba "iamguba (1 commits)")[![ItsReddi](https://avatars.githubusercontent.com/u/3147888?v=4)](https://github.com/ItsReddi "ItsReddi (1 commits)")[![giannisdag](https://avatars.githubusercontent.com/u/2151129?v=4)](https://github.com/giannisdag "giannisdag (1 commits)")[![thiagotalma](https://avatars.githubusercontent.com/u/612578?v=4)](https://github.com/thiagotalma "thiagotalma (1 commits)")[![w4m-nelsondias](https://avatars.githubusercontent.com/u/150206383?v=4)](https://github.com/w4m-nelsondias "w4m-nelsondias (1 commits)")[![pappfer](https://avatars.githubusercontent.com/u/738623?v=4)](https://github.com/pappfer "pappfer (1 commits)")[![Shaposhnikov](https://avatars.githubusercontent.com/u/2725815?v=4)](https://github.com/Shaposhnikov "Shaposhnikov (1 commits)")[![hamrak](https://avatars.githubusercontent.com/u/5807028?v=4)](https://github.com/hamrak "hamrak (1 commits)")[![himak](https://avatars.githubusercontent.com/u/7780354?v=4)](https://github.com/himak "himak (1 commits)")

---

Tags

pluginHTML5colorjqueryyii2extensionwidgetforminput

### Embed Badge

![Health badge](/badges/w4msolutions-yii2-widget-colorinput/health.svg)

```
[![Health](https://phpackages.com/badges/w4msolutions-yii2-widget-colorinput/health.svg)](https://phpackages.com/packages/w4msolutions-yii2-widget-colorinput)
```

###  Alternatives

[kartik-v/yii2-widget-colorinput

An enhanced Yii 2 widget encapsulating the HTML 5 color input (sub repo split from yii2-widgets)

345.1M15](/packages/kartik-v-yii2-widget-colorinput)[kartik-v/yii2-widget-rangeinput

An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)

214.1M3](/packages/kartik-v-yii2-widget-rangeinput)[kartik-v/yii2-widget-rating

A Yii2 widget for the simple yet powerful bootstrap-star-rating plugin with fractional rating support (sub repo split from yii2-widgets)

474.3M8](/packages/kartik-v-yii2-widget-rating)[kartik-v/yii2-widget-switchinput

A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes &amp; radios as toggle switchinputes (sub repo split from yii2-widgets)

384.6M13](/packages/kartik-v-yii2-widget-switchinput)[kartik-v/yii2-widget-datepicker

Enhanced Yii2 wrapper for the bootstrap datepicker plugin (sub repo split from yii2-widgets).

1177.3M66](/packages/kartik-v-yii2-widget-datepicker)[kartik-v/yii2-widget-touchspin

A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes &amp; radios as toggle touchspines (sub repo split from yii2-widgets)

194.3M6](/packages/kartik-v-yii2-widget-touchspin)

PHPackages © 2026

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