Download the PHP package byteforge/color-randomizer without Composer
On this page you can find all versions of the php package byteforge/color-randomizer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download byteforge/color-randomizer
More information about byteforge/color-randomizer
Files in byteforge/color-randomizer
Package color-randomizer
Short Description This could be used in various cases of color. Amzing things like generating random colors and many more.
License MIT
Informations about the package color-randomizer
Color Randomizer
Overview
Color Randomizer is a comprehensive toolkit for color manipulation and generation. Designed to provide a plethora of functionalities ranging from the generation of random colors to the conversion between color formats, it caters to a wide array of needs for developers and designers alike. Boasting a library of over 450 colors, Color Randomizer ensures both accuracy and variety in its outputs. Key features include:
- Generating single or multiple random colors
- Converting between hex and RGB color formats
- Accessing a library of over 450 featured colors
- Comparing two colors to determine their difference
- Calculating color brightness
- Extracting the RGB components from an RGB string
- Retrieving HTML color codes for over 450 colors
- Finding the closest matching color name for a given color code
- Discovering similar or complementary colors
- Showcasing all supported colors in an aesthetically pleasing manner
Installation
You Can Install The Package via Composer,
You only require laravel^6 to effortlessly install the Color Randomizer Package. No additional dependencies are necessary; just stick to the default Laravel setup.
Usage Guidelines
Generate a Single Random Color
The getSingleColor
function within Color Randomizer offers a flexible and customizable approach to generating random colors, suitable for various applications such as dynamically changing website backgrounds. Below are examples of how to use this function in different scenarios.
Example Usage:
Parameters Explained:
hex
: Determines the format of the returned color code. true for hex format, false for RGB format.minBrightness & maxBrightness
: Control the brightness of the generated color, where a higher value results in a lighter color, and a lower value results in a darker color. Note: $maxBrightness should not exceed 255.withMostMatchedName
: When set to true, the function returns an array with name and color_code, providing the closest matched color name. When false, only the color code is returned as a string.formattedName
: Specifies the format of the returned color name when $withMostMatchedName is true. true for a formatted name (e.g., 'Alice Blue'), false for the raw name (e.g., 'alice blue'). By leveraging these features, users can easily incorporate dynamic color functionalities into their projects, enhancing aesthetics and user experience.
Generate Multiple Random Colors
getMultipleColors
This function utilize everything of getSingleColor
, It just have an extra Argument At first That is the quantity of color, you want to get. It'll return you an array containing all the colors, or an all the arrays containing name and color_code.
Example Usage:
Access Our An Array Containing All 450+ Colors
It's so simple, You can easily get all of my 450+ Color Hard work in a second through ColorRandomizer::getColors() or ColorRandomizer::$colors.
Example Usage:
RGB TO HEX & HEX TO RGB
We provide the best and easiest way to convert RGB To Hex and Hex To RGB.
Example Usage:
Calculate Brightness And Difference Beetwen 2 Colors
We Provide 90%+ Accurate Results On the calculations. Easy & The Best Way for color calculation.
Example Usage:
Extract Red, Green, Blue From Full RGB
Extract Red, Green And Blue From A Full RGB Through Just Line Of code.
Example Usage:
Get Color Code From Color Name
We support 450+ Color
and search through them to get you the most Accurate color code in accordance of color name.
Get Most Matched Color Name From Color Code
The Best Color Name Finding function with Color code over 95% Accurate Results.
Get Similar Colors
The Similar Colors Function Always you to Get Similar Colors/Colors Related to the Color you give, ('Disclaimer For Custom Colors, For Fullfilling Colors Amount you may use custom color but it may make your web page a lot slower. So Not using the Custom Colors is preffered')
All Colors Page Configuration
Configure That The All Colors Page is Visible And The Route Of the Page,
Configure On ENV: