@iconoma-icons/collection 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +227 -0
- package/dist/index.d.mts +97 -0
- package/dist/index.d.ts +97 -0
- package/dist/index.js +835 -0
- package/dist/index.mjs +796 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 0xnocap
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# @iconoma-icons/collection
|
|
2
|
+
|
|
3
|
+
8 built-in styles and 8 color palettes for [Iconoma](https://github.com/0xnocap/iconoma).
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @iconoma-icons/core @iconoma-icons/collection
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Both packages are required — `core` is the engine, `collection` has the styles.
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import { createIcon } from '@iconoma-icons/core';
|
|
17
|
+
import { pixel, waves, mondrian } from '@iconoma-icons/collection';
|
|
18
|
+
|
|
19
|
+
// Generate icons — same seed always produces the same icon
|
|
20
|
+
const avatar = createIcon(pixel, { seed: 'user@example.com' });
|
|
21
|
+
const banner = createIcon(waves, { seed: 'project-123', size: 512 });
|
|
22
|
+
|
|
23
|
+
// Use as HTML
|
|
24
|
+
document.getElementById('avatar').innerHTML = avatar.toString();
|
|
25
|
+
|
|
26
|
+
// Use as image source
|
|
27
|
+
document.getElementById('img').src = banner.toDataUri();
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Styles
|
|
33
|
+
|
|
34
|
+
### `pixel` — Blocky
|
|
35
|
+
|
|
36
|
+
Cellular automaton that generates symmetric creature-like figures on a solid background. Think GitHub-style identicons but more organic.
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
createIcon(pixel, {
|
|
40
|
+
seed: 'alice',
|
|
41
|
+
styleOptions: {
|
|
42
|
+
seedDensity: 0.45, // 0.3–0.6 How densely populated the initial grid is
|
|
43
|
+
generations: 3, // 2–5 Number of Game-of-Life-style iterations
|
|
44
|
+
maxCells: 15, // 12–20 Maximum cells allowed (rejects too-dense results)
|
|
45
|
+
marginSize: 0.15, // 0.1–0.2 Margin around figure as proportion of canvas
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### `pixelated` — Pixel Grid
|
|
51
|
+
|
|
52
|
+
Symmetric pixel art on a colored background. Patterns can be diagonal stripes, concentric rings, scattered dots, or clusters.
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
createIcon(pixelated, {
|
|
56
|
+
seed: 'bob',
|
|
57
|
+
styleOptions: {
|
|
58
|
+
blockSize: 8, // 4–16 Size of each pixel block
|
|
59
|
+
patternType: 'concentric', // 'random' | 'diagonal' | 'concentric' | 'scattered' | 'clustered'
|
|
60
|
+
colorVariation: 0.5, // 0–1 How much colors vary between blocks
|
|
61
|
+
colorsPerIcon: 4, // 2–5 How many palette colors to use
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### `mondrian` — Rectangular Composition
|
|
67
|
+
|
|
68
|
+
Piet Mondrian-inspired layout — colored rectangles separated by thick lines.
|
|
69
|
+
|
|
70
|
+
```js
|
|
71
|
+
createIcon(mondrian, {
|
|
72
|
+
seed: 'charlie',
|
|
73
|
+
styleOptions: {
|
|
74
|
+
divisionCount: 10, // 4–20 Number of rectangular divisions
|
|
75
|
+
lineThickness: 3, // 1–8 Black dividing line width in px
|
|
76
|
+
balance: 0.5, // 0–1 0 = structured grid, 1 = random layout
|
|
77
|
+
colorsPerIcon: 4, // 2–5 How many palette colors to use
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### `gradient` — Smooth Gradients
|
|
83
|
+
|
|
84
|
+
Multi-stop linear gradient fills. Clean and minimal.
|
|
85
|
+
|
|
86
|
+
```js
|
|
87
|
+
createIcon(gradient, {
|
|
88
|
+
seed: 'dana',
|
|
89
|
+
styleOptions: {
|
|
90
|
+
waveComplexity: 3, // 1–5 Number of color stops in gradient
|
|
91
|
+
direction: 'diagonal', // 'horizontal' | 'vertical' | 'diagonal' | 'radial' | 'randomize'
|
|
92
|
+
blendSmoothness: 0.7, // 0–1 How smoothly colors transition
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### `mosaic` — Voronoi Tiles
|
|
98
|
+
|
|
99
|
+
Irregular polygon tiles filling the canvas — like broken glass or a stone mosaic.
|
|
100
|
+
|
|
101
|
+
```js
|
|
102
|
+
createIcon(mosaic, {
|
|
103
|
+
seed: 'eve',
|
|
104
|
+
styleOptions: {
|
|
105
|
+
tileCount: 80, // 20–200 Number of tiles
|
|
106
|
+
tileSizeVariation: 0.5, // 0–1 0 = uniform tiles, 1 = varied sizes
|
|
107
|
+
gapSize: 1, // 0–4 Gap between tiles in px
|
|
108
|
+
colorsPerIcon: 4, // 2–5 How many palette colors to use
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### `waves` — Layered Waves
|
|
114
|
+
|
|
115
|
+
Stacked sinusoidal wave bands. Each wave layer uses a different palette color.
|
|
116
|
+
|
|
117
|
+
```js
|
|
118
|
+
createIcon(waves, {
|
|
119
|
+
seed: 'frank',
|
|
120
|
+
styleOptions: {
|
|
121
|
+
waveCount: 4, // 1–8 Number of wave layers
|
|
122
|
+
amplitude: 0.25, // 0.1–0.5 Wave height as proportion of canvas
|
|
123
|
+
frequency: 3, // 1–8 Number of wave cycles across canvas
|
|
124
|
+
direction: 'horizontal', // 'horizontal' | 'vertical' | 'diagonal' | 'radial' | 'randomize'
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### `polycon` — Geometric Grid
|
|
130
|
+
|
|
131
|
+
Grid of triangles and full squares on a colored background. Clean and geometric.
|
|
132
|
+
|
|
133
|
+
```js
|
|
134
|
+
createIcon(polycon, {
|
|
135
|
+
seed: 'grace',
|
|
136
|
+
styleOptions: {
|
|
137
|
+
gridSize: 3, // 2 | 3 | 4 Grid dimensions (2×2, 3×3, or 4×4)
|
|
138
|
+
emptyProbability: 0.15, // 0–1 Chance a cell is empty (bg shows through)
|
|
139
|
+
fullSquareProbability: 0.10,// 0–1 Chance cell is a full square vs triangle
|
|
140
|
+
colorsPerIcon: 3, // 2–5 How many palette colors to use
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### `inkblot` — Rorschach Blobs
|
|
146
|
+
|
|
147
|
+
Symmetric organic blob shapes — like a Rorschach test card.
|
|
148
|
+
|
|
149
|
+
```js
|
|
150
|
+
createIcon(inkblot, {
|
|
151
|
+
seed: 'heidi',
|
|
152
|
+
styleOptions: {
|
|
153
|
+
blobCount: 3, // 1–6 Number of blob shapes
|
|
154
|
+
spread: 0.5, // 0.2–0.8 How spread out blobs are from center
|
|
155
|
+
symmetry: 'vertical', // 'none' | 'horizontal' | 'vertical' | 'both'
|
|
156
|
+
centered: false, // true = centered, false = offset allowed
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Color Palettes
|
|
164
|
+
|
|
165
|
+
8 built-in palettes. Each is an array of 5 hex color strings.
|
|
166
|
+
|
|
167
|
+
```js
|
|
168
|
+
import { palettes, paletteNames, DEFAULT_COLORS } from '@iconoma-icons/collection';
|
|
169
|
+
|
|
170
|
+
// List all palette names
|
|
171
|
+
console.log(paletteNames);
|
|
172
|
+
// → ['sunset', 'ocean', 'forest', 'neon', 'pastel', 'earth', 'mono', 'candy']
|
|
173
|
+
|
|
174
|
+
// Use a palette
|
|
175
|
+
const icon = createIcon(pixel, {
|
|
176
|
+
seed: 'demo',
|
|
177
|
+
colors: [...palettes.ocean],
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
// DEFAULT_COLORS is the 'neon' palette
|
|
181
|
+
console.log(DEFAULT_COLORS);
|
|
182
|
+
// → ['#FF006E', '#8338EC', '#3A86FF', '#FFBE0B', '#FB5607']
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
| Palette | Colors |
|
|
186
|
+
|---------|--------|
|
|
187
|
+
| **sunset** | `#FF6B6B` `#FF8E53` `#FFC857` `#E85D75` `#4A1942` |
|
|
188
|
+
| **ocean** | `#0077B6` `#00B4D8` `#90E0EF` `#023E8A` `#CAF0F8` |
|
|
189
|
+
| **forest** | `#2D6A4F` `#40916C` `#74C69D` `#1B4332` `#D8F3DC` |
|
|
190
|
+
| **neon** *(default)* | `#FF006E` `#8338EC` `#3A86FF` `#FFBE0B` `#FB5607` |
|
|
191
|
+
| **pastel** | `#FFB5A7` `#FCD5CE` `#F8EDEB` `#F9DCC4` `#FEC89A` |
|
|
192
|
+
| **earth** | `#BC6C25` `#DDA15E` `#606C38` `#283618` `#FEFAE0` |
|
|
193
|
+
| **mono** | `#F8F9FA` `#DEE2E6` `#ADB5BD` `#495057` `#212529` |
|
|
194
|
+
| **candy** | `#F72585` `#7209B7` `#3A0CA3` `#4361EE` `#4CC9F0` |
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Full Exports
|
|
199
|
+
|
|
200
|
+
```js
|
|
201
|
+
// Styles
|
|
202
|
+
import { pixel, pixelated, mondrian, gradient, mosaic, waves, polycon, inkblot } from '@iconoma-icons/collection';
|
|
203
|
+
|
|
204
|
+
// Palettes
|
|
205
|
+
import { palettes, paletteNames, DEFAULT_PALETTE, DEFAULT_COLORS } from '@iconoma-icons/collection';
|
|
206
|
+
|
|
207
|
+
// Types
|
|
208
|
+
import type { Palette, PaletteName } from '@iconoma-icons/collection';
|
|
209
|
+
import type {
|
|
210
|
+
BlockyParams, // pixel style options
|
|
211
|
+
PixelParams, // pixelated style options
|
|
212
|
+
MondrianParams, // mondrian style options
|
|
213
|
+
GradientParams, // gradient style options
|
|
214
|
+
MosaicParams, // mosaic style options
|
|
215
|
+
WavesParams, // waves style options
|
|
216
|
+
PolyconParams, // polycon style options
|
|
217
|
+
InkblotParams, // inkblot style options
|
|
218
|
+
StyleParameters, // union of all style params
|
|
219
|
+
} from '@iconoma-icons/collection';
|
|
220
|
+
|
|
221
|
+
// Default parameter values
|
|
222
|
+
import { DEFAULT_PARAMETERS } from '@iconoma-icons/collection';
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## License
|
|
226
|
+
|
|
227
|
+
[MIT](../../LICENSE)
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { Style } from '@iconoma-icons/core';
|
|
2
|
+
|
|
3
|
+
declare const pixel: Style;
|
|
4
|
+
|
|
5
|
+
declare const pixelated: Style;
|
|
6
|
+
|
|
7
|
+
declare const mondrian: Style;
|
|
8
|
+
|
|
9
|
+
declare const gradient: Style;
|
|
10
|
+
|
|
11
|
+
declare const mosaic: Style;
|
|
12
|
+
|
|
13
|
+
declare const waves: Style;
|
|
14
|
+
|
|
15
|
+
declare const polycon: Style;
|
|
16
|
+
|
|
17
|
+
declare const inkblot: Style;
|
|
18
|
+
|
|
19
|
+
interface Palette {
|
|
20
|
+
name: string;
|
|
21
|
+
colors: string[];
|
|
22
|
+
}
|
|
23
|
+
declare const palettes: {
|
|
24
|
+
readonly sunset: readonly ["#FF6B6B", "#FF8E53", "#FFC857", "#E85D75", "#4A1942"];
|
|
25
|
+
readonly ocean: readonly ["#0077B6", "#00B4D8", "#90E0EF", "#023E8A", "#CAF0F8"];
|
|
26
|
+
readonly forest: readonly ["#2D6A4F", "#40916C", "#74C69D", "#1B4332", "#D8F3DC"];
|
|
27
|
+
readonly neon: readonly ["#FF006E", "#8338EC", "#3A86FF", "#FFBE0B", "#FB5607"];
|
|
28
|
+
readonly pastel: readonly ["#FFB5A7", "#FCD5CE", "#F8EDEB", "#F9DCC4", "#FEC89A"];
|
|
29
|
+
readonly earth: readonly ["#BC6C25", "#DDA15E", "#606C38", "#283618", "#FEFAE0"];
|
|
30
|
+
readonly mono: readonly ["#F8F9FA", "#DEE2E6", "#ADB5BD", "#495057", "#212529"];
|
|
31
|
+
readonly candy: readonly ["#F72585", "#7209B7", "#3A0CA3", "#4361EE", "#4CC9F0"];
|
|
32
|
+
};
|
|
33
|
+
type PaletteName = keyof typeof palettes;
|
|
34
|
+
declare const paletteNames: PaletteName[];
|
|
35
|
+
declare const DEFAULT_PALETTE: PaletteName;
|
|
36
|
+
declare const DEFAULT_COLORS: readonly ["#FF006E", "#8338EC", "#3A86FF", "#FFBE0B", "#FB5607"];
|
|
37
|
+
|
|
38
|
+
interface BlockyParams {
|
|
39
|
+
seedDensity: number;
|
|
40
|
+
generations: number;
|
|
41
|
+
maxCells: number;
|
|
42
|
+
marginSize: number;
|
|
43
|
+
}
|
|
44
|
+
interface PixelParams {
|
|
45
|
+
blockSize: number;
|
|
46
|
+
patternType: 'random' | 'diagonal' | 'concentric' | 'scattered' | 'clustered';
|
|
47
|
+
colorVariation: number;
|
|
48
|
+
colorsPerIcon: number;
|
|
49
|
+
}
|
|
50
|
+
interface MondrianParams {
|
|
51
|
+
divisionCount: number;
|
|
52
|
+
lineThickness: number;
|
|
53
|
+
balance: number;
|
|
54
|
+
colorsPerIcon: number;
|
|
55
|
+
}
|
|
56
|
+
interface GradientParams {
|
|
57
|
+
waveComplexity: number;
|
|
58
|
+
direction: 'horizontal' | 'vertical' | 'diagonal' | 'radial' | 'randomize';
|
|
59
|
+
blendSmoothness: number;
|
|
60
|
+
}
|
|
61
|
+
interface MosaicParams {
|
|
62
|
+
tileCount: number;
|
|
63
|
+
tileSizeVariation: number;
|
|
64
|
+
gapSize: number;
|
|
65
|
+
colorsPerIcon: number;
|
|
66
|
+
}
|
|
67
|
+
interface WavesParams {
|
|
68
|
+
waveCount: number;
|
|
69
|
+
amplitude: number;
|
|
70
|
+
frequency: number;
|
|
71
|
+
direction: 'horizontal' | 'vertical' | 'diagonal' | 'radial' | 'randomize';
|
|
72
|
+
}
|
|
73
|
+
interface PolyconParams {
|
|
74
|
+
gridSize: 2 | 3 | 4;
|
|
75
|
+
emptyProbability: number;
|
|
76
|
+
fullSquareProbability: number;
|
|
77
|
+
colorsPerIcon: number;
|
|
78
|
+
}
|
|
79
|
+
interface InkblotParams {
|
|
80
|
+
blobCount: number;
|
|
81
|
+
spread: number;
|
|
82
|
+
symmetry: 'none' | 'horizontal' | 'vertical' | 'both';
|
|
83
|
+
centered: boolean;
|
|
84
|
+
}
|
|
85
|
+
type StyleParameters = {
|
|
86
|
+
pixel: BlockyParams;
|
|
87
|
+
pixelated: PixelParams;
|
|
88
|
+
mondrian: MondrianParams;
|
|
89
|
+
gradient: GradientParams;
|
|
90
|
+
mosaic: MosaicParams;
|
|
91
|
+
waves: WavesParams;
|
|
92
|
+
polycon: PolyconParams;
|
|
93
|
+
inkblot: InkblotParams;
|
|
94
|
+
};
|
|
95
|
+
declare const DEFAULT_PARAMETERS: StyleParameters;
|
|
96
|
+
|
|
97
|
+
export { type BlockyParams, DEFAULT_COLORS, DEFAULT_PALETTE, DEFAULT_PARAMETERS, type GradientParams, type InkblotParams, type MondrianParams, type MosaicParams, type Palette, type PaletteName, type PixelParams, type PolyconParams, type StyleParameters, type WavesParams, gradient, inkblot, mondrian, mosaic, paletteNames, palettes, pixel, pixelated, polycon, waves };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { Style } from '@iconoma-icons/core';
|
|
2
|
+
|
|
3
|
+
declare const pixel: Style;
|
|
4
|
+
|
|
5
|
+
declare const pixelated: Style;
|
|
6
|
+
|
|
7
|
+
declare const mondrian: Style;
|
|
8
|
+
|
|
9
|
+
declare const gradient: Style;
|
|
10
|
+
|
|
11
|
+
declare const mosaic: Style;
|
|
12
|
+
|
|
13
|
+
declare const waves: Style;
|
|
14
|
+
|
|
15
|
+
declare const polycon: Style;
|
|
16
|
+
|
|
17
|
+
declare const inkblot: Style;
|
|
18
|
+
|
|
19
|
+
interface Palette {
|
|
20
|
+
name: string;
|
|
21
|
+
colors: string[];
|
|
22
|
+
}
|
|
23
|
+
declare const palettes: {
|
|
24
|
+
readonly sunset: readonly ["#FF6B6B", "#FF8E53", "#FFC857", "#E85D75", "#4A1942"];
|
|
25
|
+
readonly ocean: readonly ["#0077B6", "#00B4D8", "#90E0EF", "#023E8A", "#CAF0F8"];
|
|
26
|
+
readonly forest: readonly ["#2D6A4F", "#40916C", "#74C69D", "#1B4332", "#D8F3DC"];
|
|
27
|
+
readonly neon: readonly ["#FF006E", "#8338EC", "#3A86FF", "#FFBE0B", "#FB5607"];
|
|
28
|
+
readonly pastel: readonly ["#FFB5A7", "#FCD5CE", "#F8EDEB", "#F9DCC4", "#FEC89A"];
|
|
29
|
+
readonly earth: readonly ["#BC6C25", "#DDA15E", "#606C38", "#283618", "#FEFAE0"];
|
|
30
|
+
readonly mono: readonly ["#F8F9FA", "#DEE2E6", "#ADB5BD", "#495057", "#212529"];
|
|
31
|
+
readonly candy: readonly ["#F72585", "#7209B7", "#3A0CA3", "#4361EE", "#4CC9F0"];
|
|
32
|
+
};
|
|
33
|
+
type PaletteName = keyof typeof palettes;
|
|
34
|
+
declare const paletteNames: PaletteName[];
|
|
35
|
+
declare const DEFAULT_PALETTE: PaletteName;
|
|
36
|
+
declare const DEFAULT_COLORS: readonly ["#FF006E", "#8338EC", "#3A86FF", "#FFBE0B", "#FB5607"];
|
|
37
|
+
|
|
38
|
+
interface BlockyParams {
|
|
39
|
+
seedDensity: number;
|
|
40
|
+
generations: number;
|
|
41
|
+
maxCells: number;
|
|
42
|
+
marginSize: number;
|
|
43
|
+
}
|
|
44
|
+
interface PixelParams {
|
|
45
|
+
blockSize: number;
|
|
46
|
+
patternType: 'random' | 'diagonal' | 'concentric' | 'scattered' | 'clustered';
|
|
47
|
+
colorVariation: number;
|
|
48
|
+
colorsPerIcon: number;
|
|
49
|
+
}
|
|
50
|
+
interface MondrianParams {
|
|
51
|
+
divisionCount: number;
|
|
52
|
+
lineThickness: number;
|
|
53
|
+
balance: number;
|
|
54
|
+
colorsPerIcon: number;
|
|
55
|
+
}
|
|
56
|
+
interface GradientParams {
|
|
57
|
+
waveComplexity: number;
|
|
58
|
+
direction: 'horizontal' | 'vertical' | 'diagonal' | 'radial' | 'randomize';
|
|
59
|
+
blendSmoothness: number;
|
|
60
|
+
}
|
|
61
|
+
interface MosaicParams {
|
|
62
|
+
tileCount: number;
|
|
63
|
+
tileSizeVariation: number;
|
|
64
|
+
gapSize: number;
|
|
65
|
+
colorsPerIcon: number;
|
|
66
|
+
}
|
|
67
|
+
interface WavesParams {
|
|
68
|
+
waveCount: number;
|
|
69
|
+
amplitude: number;
|
|
70
|
+
frequency: number;
|
|
71
|
+
direction: 'horizontal' | 'vertical' | 'diagonal' | 'radial' | 'randomize';
|
|
72
|
+
}
|
|
73
|
+
interface PolyconParams {
|
|
74
|
+
gridSize: 2 | 3 | 4;
|
|
75
|
+
emptyProbability: number;
|
|
76
|
+
fullSquareProbability: number;
|
|
77
|
+
colorsPerIcon: number;
|
|
78
|
+
}
|
|
79
|
+
interface InkblotParams {
|
|
80
|
+
blobCount: number;
|
|
81
|
+
spread: number;
|
|
82
|
+
symmetry: 'none' | 'horizontal' | 'vertical' | 'both';
|
|
83
|
+
centered: boolean;
|
|
84
|
+
}
|
|
85
|
+
type StyleParameters = {
|
|
86
|
+
pixel: BlockyParams;
|
|
87
|
+
pixelated: PixelParams;
|
|
88
|
+
mondrian: MondrianParams;
|
|
89
|
+
gradient: GradientParams;
|
|
90
|
+
mosaic: MosaicParams;
|
|
91
|
+
waves: WavesParams;
|
|
92
|
+
polycon: PolyconParams;
|
|
93
|
+
inkblot: InkblotParams;
|
|
94
|
+
};
|
|
95
|
+
declare const DEFAULT_PARAMETERS: StyleParameters;
|
|
96
|
+
|
|
97
|
+
export { type BlockyParams, DEFAULT_COLORS, DEFAULT_PALETTE, DEFAULT_PARAMETERS, type GradientParams, type InkblotParams, type MondrianParams, type MosaicParams, type Palette, type PaletteName, type PixelParams, type PolyconParams, type StyleParameters, type WavesParams, gradient, inkblot, mondrian, mosaic, paletteNames, palettes, pixel, pixelated, polycon, waves };
|