petehouston / color-converter

在十六进制和RGB之间转换颜色。

1.1.0 2016-10-31 15:42 UTC

This package is auto-updated.

Last update: 2024-09-27 22:33:19 UTC


README

Build Status

这是一个简单的PHP库,用于在十六进制和RGB之间进行转换。

用法

一个单独的类 ColorConverter,包含两个函数

hex2rgb(string $hex)

返回一个包含红、绿、蓝三个值的数组.

rgb2hex(int $red, int $green, int $blue)

返回一个十六进制字符串表示形式.

已添加使用Travis CI构建。