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.
PHP >= 7.3
You can install the package with Composer.
composer require binafy/php-color-generator
If you may convert hex to RGB, you need to use hexToRGB()
method:
use Binafy\PhpColorGenerator\Color;
Color::hexToRGB('1363df');
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',
]);
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')
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')
If you want to generate shades from hex color, you can use generateShades()
method:
use Binafy\PhpColorGenerator\Color;
Color::generateShades('1363df', 10);
If you want to generate tints from hex color, you can use generateTints()
method:
use Binafy\PhpColorGenerator\Color;
Color::generateTints('1363df', 10);
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')
If you discover any security-related issues, please email binafy23@gmail.com
instead of using the issue tracker.
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.
The MIT License (MIT). Please see License File for more information.
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!
If this package is helpful for you, you can buy a coffee for me :) ❤️
- Iranian Gateway: https://daramet.com/milwad_khosravi
- Paypal Gateway: SOON
- MetaMask Address:
0xf208a562c5a93DEf8450b656c3dbc1d0a53BDE58