craftcms/hexdec
Composer 安装命令:
composer require craftcms/hexdec
包简介
Adds a new hexdec filter to Craft, which will convert a hexadecimal value to a decimal.
关键字:
README 文档
README
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() function.
{% set r = entry.colorField[1:2]|hexdec %}
{% set g = entry.colorField[3:2]|hexdec %}
{% set b = entry.colorField[5:2]|hexdec %}
Requirements
This plugin requires Craft CMS 4.0.0+ or 5.0.0+.
Installation
You can install this plugin from the Plugin Store or with Composer.
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
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
统计信息
- 总下载量: 3.3k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-07-14