PHPackages                             craftcms/hexdec - 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. craftcms/hexdec

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

craftcms/hexdec
===============

Adds a new hexdec filter to Craft, which will convert a hexadecimal value to a decimal.

3.1.0(2y ago)53.3k1[3 PRs](https://github.com/craftcms/hexdec/pulls)MITPHPCI passing

Since Jul 14Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/craftcms/hexdec)[ Packagist](https://packagist.org/packages/craftcms/hexdec)[ RSS](/packages/craftcms-hexdec/feed)WikiDiscussions 3.x Synced 5d ago

READMEChangelog (1)Dependencies (4)Versions (10)Used By (0)

Hexdec for Craft CMS
====================

[](#hexdec-for-craft-cms)

This plugin adds a new `|hexdec` Twig filter to Craft, which will convert a hexadecimal value to a decimal.

It is a wrapper for PHP’s [hexdec()](http://php.net/manual/en/function.hexdec.php) function.

```
{% set r = entry.colorField[1:2]|hexdec %}
{% set g = entry.colorField[3:2]|hexdec %}
{% set b = entry.colorField[5:2]|hexdec %}
```

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 4.0.0+ or 5.0.0+.

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

[](#installation)

You can install this plugin from the Plugin Store or with Composer.

#### From the Plugin Store

[](#from-the-plugin-store)

Go to the Plugin Store in your project’s Control Panel and search for “Hexdec”. Then click on the “Install” button in its modal window.

#### With Composer

[](#with-composer)

Open your terminal and run the following commands:

```
# go to the project directory
cd /path/to/my-project.test

# tell Composer to load the plugin
composer require craftcms/hexdec

# tell Craft to install the plugin
./craft install/plugin hexdec
```

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance59

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 60.9% 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 ~407 days

Recently: every ~574 days

Total

7

Last Release

834d ago

Major Versions

v2.x-dev → 3.0.02022-05-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ccdf8b493035de2343c55bd889513e3af5c04d5823482a2b186ad16adb1c3e3?d=identicon)[brandonkelly](/maintainers/brandonkelly)

---

Top Contributors

[![brandonkelly](https://avatars.githubusercontent.com/u/47792?v=4)](https://github.com/brandonkelly "brandonkelly (28 commits)")[![angrybrad](https://avatars.githubusercontent.com/u/61869?v=4)](https://github.com/angrybrad "angrybrad (15 commits)")[![benjamindavid](https://avatars.githubusercontent.com/u/2911900?v=4)](https://github.com/benjamindavid "benjamindavid (1 commits)")[![i-just](https://avatars.githubusercontent.com/u/4500340?v=4)](https://github.com/i-just "i-just (1 commits)")[![MakeilaLundy](https://avatars.githubusercontent.com/u/19892516?v=4)](https://github.com/MakeilaLundy "MakeilaLundy (1 commits)")

---

Tags

craft-plugincraft2craft3craftcmscmsyii2craftcmshexdec

### Embed Badge

![Health badge](/badges/craftcms-hexdec/health.svg)

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

###  Alternatives

[spicyweb/craft-neo

A Matrix-like field type with block hierarchy

393813.5k10](/packages/spicyweb-craft-neo)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

293952.6k30](/packages/craftcms-feed-me)[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k59](/packages/verbb-formie)[craftcms/ckeditor

Edit rich text content in Craft CMS using CKEditor.

47390.0k72](/packages/craftcms-ckeditor)[verbb/comments

Add comments to your site.

13753.9k](/packages/verbb-comments)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)

PHPackages © 2026

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