承接 brio/named-colors 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

brio/named-colors

Composer 安装命令:

composer require brio/named-colors

包简介

Find a color's hexadecimal value from its name

README 文档

README

Find a color's hexadecimal value from its name.

This library does not only list all the HTML colors, but also :

Installation

With composer :

composer require brio/named-colors

Usage

use Brio\NamedColors;

// Find a color from its name or reference
// Note that, if multiple matches are possible, the first match is returned
// html colors are always first to be matched
$color = NamedColors::findHexByName('red'); // returns #FF0000
$color = NamedColors::findHexByName('Google Red'); // returns #EA4335

// Find a color from its name, with a specific color set
$color = NamedColors::findHexByName('red', 'xkcd'); // returns #E50000

Contributing

Feel free to add your own color schemes, as soon as they meet these requirements :

  • All colors schemes should be created in the src/colors directory
  • They must only contain one array, named $colors
  • Each item of this array must have one key, and these three values :
    • reference
    • name
    • hexa
  • The key should be a camelCase version of the color's name
  • reference and name are not mandatory
  • The hexa key is mandatory, it should contain the hexadecimal value of the color, prefixed with a sharp (#).

Credit

The first release's colors all come from the W3Schools website, thanks to them !

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固