PHPackages                             sjaakp/yii2-iro - 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. sjaakp/yii2-iro

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

sjaakp/yii2-iro
===============

Color picker for the Yii 2.0 framework

1.1.0(4y ago)1896MITPHP

Since Apr 16Pushed 4y ago1 watchersCompare

[ Source](https://github.com/sjaakp/yii2-iro)[ Packagist](https://packagist.org/packages/sjaakp/yii2-iro)[ RSS](/packages/sjaakp-yii2-iro/feed)WikiDiscussions master Synced 2mo ago

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

yii2-iro
========

[](#yii2-iro)

#### Color picker widget for Yii2

[](#color-picker-widget-for-yii2)

[![Latest Stable Version](https://camo.githubusercontent.com/6b901ccab23ff47f2b0d3a303abbd7bc76a45736c212c7aea493619d2167c447/68747470733a2f2f706f7365722e707567782e6f72672f736a61616b702f796969322d69726f2f762f737461626c65)](https://packagist.org/packages/sjaakp/yii2-iro)[![Total Downloads](https://camo.githubusercontent.com/89ad645612475ef8bffb781a95e400216ddd8264255f4475fde8d9918ecc183d/68747470733a2f2f706f7365722e707567782e6f72672f736a61616b702f796969322d69726f2f646f776e6c6f616473)](https://packagist.org/packages/sjaakp/yii2-iro)[![License](https://camo.githubusercontent.com/51158324d8de8b9b8dbbc7af29eb48229875419da73abb00295123c56e6264f9/68747470733a2f2f706f7365722e707567782e6f72672f736a61616b702f796969322d69726f2f6c6963656e7365)](https://packagist.org/packages/sjaakp/yii2-iro)

**yii2-iro** is a widget to choose a color. You can use it in an `ActiveForm`like any other `InputWidget` in the [Yii 2.0](https://www.yiiframework.com/ "Yii") PHP Framework.

**yii2-iro** is a wrapper around the excellent [**iro.js** JavaScript color picker](https://iro.js.org/), created by James Daniel.

**yii2-iro** can appear in two modes: inline (directly in the page) or in a popup-dialog that opens when a colored button is clicked.

A demonstration of **Yii2-iro** is [here](http://www.sjaakpriester.nl/software/iro).

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

[](#installation)

Install **yii2-iro** in the usual way with [Composer](https://getcomposer.org/). Add the following to the require section of your `composer.json` file:

`"sjaakp/yii2-iro": "*"`

or run:

`composer require sjaakp/yii2-iro`

You can manually install **yii2-iro** by [downloading the source in ZIP-format](https://github.com/sjaakp/yii2-iro/archive/master.zip).

Using yii2-iro
--------------

[](#using-yii2-iro)

Use **yii2-iro** just like you would use any other a [`InputWidget`](https://www.yiiframework.com/doc/api/2.0/yii-widgets-inputwidget "Yii Framework"). For instance, in an [`ActiveForm`](https://www.yiiframework.com/doc/api/2.0/yii-widgets-activeform)you might have something like:

```

...

    ?>
    ...

...

```

To render **yii2-iro** outside of an `ActiveForm` we could use something like:

```

...
;
...

```

Options
-------

[](#options)

The **yii2-iro** widget has all the options of a [`InputWidget`](https://www.yiiframework.com/doc/api/2.0/yii-widgets-inputwidget "Yii Framework"), plus the following:

#### clientOptions

[](#clientoptions)

`array` Options for the underlying [**iro.js** color picker](https://iro.js.org/guide.html#color-picker-options). Default: `[]`.

#### popup

[](#popup)

`boolean` Determines the appearance of the **yii2-iro** widget.

- **false** The widget appears inline, directly on the page.
- **true** The widget appears as a colored button. Clicking it shows the color button in a modal dialog.

Default: `true`.

#### opacity

[](#opacity)

`boolean` Determines whether or not an opacity (alpha) slider will be provided.

#### colorFormat

[](#colorformat)

`string` One of the [color formats](https:https://iro.js.org/color_api.html#supported-color-formats) available to the **iro.js** color picker. Default: `'hexString'`.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Every ~1103 days

Total

2

Last Release

1480d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/156f636aceedc73021a2bfafb5433271c2c55d6cf4bce06b12902c85b4b491f1?d=identicon)[sjaakp](/maintainers/sjaakp)

---

Top Contributors

[![sjaakp](https://avatars.githubusercontent.com/u/5585878?v=4)](https://github.com/sjaakp "sjaakp (7 commits)")

---

Tags

coloryii2extensionwidgetyiicolor picker

### Embed Badge

![Health badge](/badges/sjaakp-yii2-iro/health.svg)

```
[![Health](https://phpackages.com/badges/sjaakp-yii2-iro/health.svg)](https://phpackages.com/packages/sjaakp-yii2-iro)
```

###  Alternatives

[sjaakp/yii2-taggable

Manage tags of ActiveRecord in Yii2.

3030.6k](/packages/sjaakp-yii2-taggable)

PHPackages © 2026

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