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