2017 © Pedro Peláez
 

library laricon

Generate awesome and unique identicons with beautiful colors

image

vikin/laricon

Generate awesome and unique identicons with beautiful colors

  • Thursday, April 6, 2017
  • by VikinDev
  • Repository
  • 1 Watchers
  • 6 Stars
  • 281 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

Identicon generator for Laravel

Laricon is a library which generate an identicon image based on a string., (*1)

Here is some examples of awesome results!, (*2)

Identicon example #1   Identicon example #2   Identicon example #3   Identicon example #4   Identicon example #5, (*3)

Installation

composer require vikin/laricon

Usage

Images are generated in PNG format with transparent background., (*4)

The string can be an email, an IP address, a username, an ID or something else., (*5)

Generate an identicon

Add in the config/app.php file, (*6)

``` php 'providers' => [ .... Vikin\Laricon\Providers\LariconServiceProvider::class ],, (*7)

'aliases' => [ .... 'Laricon' => Vikin\Laricon\Facades\Laricon::class ], (*8)


Then you can generate and display an identicon image ``` php Laricon::displayImage('vikin');

or generate and get the image data, (*9)

``` php Laricon::getImageData('vikin');, (*10)


or generate and get the base 64 image uri ready for integrate into an HTML img tag. ``` php Laricon::getImageDataUri('vikin');

``` html Vikin Identicon, (*11)



### Change the size By default the size will be 64 pixels. If you want to change the image size just add a secondary parameter. 512 x 512px in this example. ``` php Laricon::displayImage('vikin', 512);

Color

The color is automatically generated according to the string hash but you can chose to specify a color by adding a third argument., (*12)

Color can be an hexadecimal with 6 characters, (*13)

``` php Laricon::displayImage('vikin', 64, 'A87EDF');, (*14)


or an array with red, green, blue value ``` php Laricon::displayImage('foo', 64, [200, 100, 150]);

That's it!, (*15)

License

Identicon is released under the MIT License. See the bundled LICENSE file for details., (*16)

From the yzalis/Identicon, (*17)

The Versions

06/04 2017

dev-master

9999999-dev

Generate awesome and unique identicons with beautiful colors

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by vikin

icon identicons laricon

06/04 2017

v1.0

1.0.0.0

Generate awesome and unique identicons with beautiful colors

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by vikin

icon identicons laricon