binafy/php-color-generator 问题修复 & 功能扩展

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

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

binafy/php-color-generator

最新稳定版本:v1.0.0

Composer 安装命令:

composer require binafy/php-color-generator

包简介

Generate colors with PHP

README 文档

README

php-color-generator

PHP Version Require Latest Stable Version Total Downloads License Passed Tests

Introduction

The PHP Color Generator is a versatile PHP package designed for easy and efficient color manipulation. Whether you're working with color schemes, themes, or UI designs, this package provides a set of utilities to convert, darken, lighten, and generate shades or tints of colors. It supports the conversion of hex to RGB and vice versa, allows for adjusting the lightness or darkness of colors, and can generate a series of tints or shades based on a base color. Ideal for designers and developers who need to programmatically handle color variations for dynamic interfaces or applications.

Requirements

  • PHP >= 7.3

Installation

You can install the package with Composer.

composer require binafy/php-color-generator

Usage

hexToRGB(string $hex): array

If you may convert hex to RGB, you need to use hexToRGB() method:

use Binafy\PhpColorGenerator\Color;

Color::hexToRGB('1363df');

rgbToHex(string $hex): string

If you may convert RGB to hex, you need to use rgbToHex() method:

use Binafy\PhpColorGenerator\Color;

Color::rgbToHex([
    'red' => '19',
    'green' => '99',
    'blue' => '223',
]);

darken(array $rgb, float $percentage): array

If you may get darken rgb color, you can use darken() method:

use Binafy\PhpColorGenerator\Color;

Color::darken([
    'red' => '19',
    'green' => '99',
    'blue' => '223',
], 0.5); // array ('red', 'blue', 'green')

lighten(array $rgb, float $percentage): array

If you may get lighten rgb color, you can use lighten() method:

use Binafy\PhpColorGenerator\Color;

Color::lighten([
    'red' => '19',
    'green' => '99',
    'blue' => '223',
], 0.5); // array ('red', 'blue', 'green')

generateShades(string $hex, int $times): array

If you want to generate shades from hex color, you can use generateShades() method:

use Binafy\PhpColorGenerator\Color;

Color::generateShades('1363df', 10);

generateTints(string $hex, int $times): array

If you want to generate tints from hex color, you can use generateTints() method:

use Binafy\PhpColorGenerator\Color;

Color::generateTints('1363df', 10);

generateDarkBrightColors(string $hex, int $times = 10): array

If you want to generate tints, shades from hex color, you can use generateDarkBrightColors() method:

use Binafy\PhpColorGenerator\Color;

Color::generateDarkBrightColors('1363df', 10); // array ('dark', 'light')

Security

If you discover any security-related issues, please email binafy23@gmail.com instead of using the issue tracker.

Changelog

The changelog can be found in the CHANGELOG.md file of the GitHub repository. It lists the changes, bug fixes, and improvements made to each version of the Laravel User Monitoring package.

License

The MIT License (MIT). Please see License File for more information.

Star History

Star History Chart

Conclusion

Congratulations! You have successfully installed and integrated the Laravel User Monitoring package into your Laravel application. By effectively logging and analyzing user activity, you can gain valuable insights that can help you improve your application's user experience and performance. If you have any questions or need further assistance, please refer to the documentation or seek help from the package's GitHub repository. Happy monitoring!

Donate

If this package is helpful for you, you can buy a coffee for me :) ❤️

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固