Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php color generator

function randomRGB()
{
    $r = rand(0, 255);
    $g = rand(0, 255);
    $b = rand(0, 255);

    return "rgb({$r}, {$g}, {$b})";
}

function randomHexColor()
{
    return '#' . substr(str_shuffle('ABCDEF0123456789'), 0, 6);
}

$hexColor = randomHexColor();
$rgbColor = randomRGB();
Comment

PREVIOUS NEXT
Code Example
Php :: duplicate record laravel 
Php :: get all laravel validation failed messages 
Php :: yii2 html a 
Php :: IlluminateDatabaseQueryExcep Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`)) laravel 
Php :: number_format reverse php 
Php :: laravel check if object is empty 
Php :: laravel collection slice 
Php :: laravel read file from tmp 
Php :: php array_filter 
Php :: php get looping month 
Php :: update query in php 
Php :: php json_encode utf8 
Php :: ACF Photo Gallery Output 
Php :: php variable in string 
Php :: wordpress get page number 
Php :: print only some characters of a string in php 
Php :: onclick call route laravel 
Php :: comment in php 
Php :: hide env file in laravel 
Php :: join array in php as string 
Php :: laravel rename table 
Php :: subdomain in laravel and xampp 
Php :: use multiple pagination in same page laravel 
Php :: wp shortcode 
Php :: get post index wordpress 
Php :: laravel form old value array 
Php :: how do we calculate average in laravel 8 
Php :: zero padding php 
Php :: multiple routes same controller laravel 
Php :: how to create laravel project 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =