shahonseven/php-color-hash 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shahonseven/php-color-hash

最新稳定版本:1.0.0

Composer 安装命令:

composer require shahonseven/php-color-hash

包简介

Generate color based on the given string. Backported from the Javascript library color-hash

README 文档

README

Generate color based on the given string. PHP Port of ColorHash Javascript Library.

Requires 64-bit PHP build.

Usage

Composer

composer require shahonseven/php-color-hash

Basic

$colorHash = new Shahonseven\ColorHash();

// in HSL, Hue ∈ [0, 360), Saturation ∈ [0, 1], Lightness ∈ [0, 1]
$colorHash->hsl('Hello World'); // [ 225, 0.65, 0.35 ]

// in RGB, R, G, B ∈ [0, 255]
$colorHash->rgb('Hello World'); // [ 135, 150, 197 ]

// in HEX
$colorHash->hex('Hello World'); // '#8796c5'

统计信息

  • 总下载量: 68.46k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-08