source: config/laravolt/avatar.php

Last change on this file was dfae77e, checked in by Igor Danilovski <igor_danilovski@…>, 2 years ago
  • Initial commit;
  • Property mode set to 100644
File size: 4.2 KB
RevLine 
[dfae77e]1<?php
2
3/*
4 * Set specific configuration variables here
5 */
6return [
7
8 /*
9 |--------------------------------------------------------------------------
10 | Image Driver
11 |--------------------------------------------------------------------------
12 | Avatar use Intervention Image library to process image.
13 | Meanwhile, Intervention Image supports "GD Library" and "Imagick" to process images
14 | internally. You may choose one of them according to your PHP
15 | configuration. By default PHP's "Imagick" implementation is used.
16 |
17 | Supported: "gd", "imagick"
18 |
19 */
20 'driver' => env('IMAGE_DRIVER', 'imagick'),
21
22 // Initial generator class
23 'generator' => \Laravolt\Avatar\Generator\DefaultGenerator::class,
24
25 // Whether all characters supplied must be replaced with their closest ASCII counterparts
26 'ascii' => false,
27
28 // Image shape: circle or square
29 'shape' => 'circle',
30
31 // Image width, in pixel
32 'width' => 100,
33
34 // Image height, in pixel
35 'height' => 100,
36
37 // Number of characters used as initials. If name consists of single word, the first N character will be used
38 'chars' => 2,
39
40 // font size
41 'fontSize' => 48,
42
43 // convert initial letter in uppercase
44 'uppercase' => false,
45
46 // Right to Left (RTL)
47 'rtl' => false,
48
49 // Fonts used to render text.
50 // If contains more than one fonts, randomly selected based on name supplied
51 'fonts' => [__DIR__ . '/../fonts/OpenSans-Bold.ttf', __DIR__ . '/../fonts/rockwell.ttf'],
52
53 // List of foreground colors to be used, randomly selected based on name supplied
54 'foregrounds' => [
55 '#FFFFFF',
56 ],
57
58 // List of background colors to be used, randomly selected based on name supplied
59 'backgrounds' => [
60 '#f44336',
61 '#E91E63',
62 '#9C27B0',
63 '#673AB7',
64 '#3F51B5',
65 '#2196F3',
66 '#03A9F4',
67 '#00BCD4',
68 '#009688',
69 '#4CAF50',
70 '#8BC34A',
71 '#CDDC39',
72 '#FFC107',
73 '#FF9800',
74 '#FF5722',
75 ],
76
77 'border' => [
78 'size' => 1,
79
80 // border color, available value are:
81 // 'foreground' (same as foreground color)
82 // 'background' (same as background color)
83 // or any valid hex ('#aabbcc')
84 'color' => 'background',
85
86 // border radius, currently only work for SVG
87 'radius' => 0,
88 ],
89
90 // List of theme name to be used when rendering avatar
91 // Possible values are:
92 // 1. Theme name as string: 'colorful'
93 // 2. Or array of string name: ['grayscale-light', 'grayscale-dark']
94 // 3. Or wildcard "*" to use all defined themes
95 'theme' => ['colorful'],
96
97 // Predefined themes
98 // Available theme attributes are:
99 // shape, chars, backgrounds, foregrounds, fonts, fontSize, width, height, ascii, uppercase, and border.
100 'themes' => [
101 'grayscale-light' => [
102 'backgrounds' => ['#edf2f7', '#e2e8f0', '#cbd5e0'],
103 'foregrounds' => ['#a0aec0'],
104 ],
105 'grayscale-dark' => [
106 'backgrounds' => ['#2d3748', '#4a5568', '#718096'],
107 'foregrounds' => ['#e2e8f0'],
108 ],
109 'colorful' => [
110 'backgrounds' => [
111 '#f44336',
112 '#E91E63',
113 '#9C27B0',
114 '#673AB7',
115 '#3F51B5',
116 '#2196F3',
117 '#03A9F4',
118 '#00BCD4',
119 '#009688',
120 '#4CAF50',
121 '#8BC34A',
122 '#CDDC39',
123 '#FFC107',
124 '#FF9800',
125 '#FF5722',
126 ],
127 'foregrounds' => ['#FFFFFF'],
128 ],
129 'pastel' => [
130 'backgrounds' => [
131 '#ef9a9a',
132 '#F48FB1',
133 '#CE93D8',
134 '#B39DDB',
135 '#9FA8DA',
136 '#90CAF9',
137 '#81D4FA',
138 '#80DEEA',
139 '#80CBC4',
140 '#A5D6A7',
141 '#E6EE9C',
142 '#FFAB91',
143 '#FFCCBC',
144 '#D7CCC8',
145 ],
146 'foregrounds' => [
147 '#FFF',
148 ],
149 ],
150 ],
151];
Note: See TracBrowser for help on using the repository browser.