@arraypress/covers 0.0.0-stage → 1.1.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.
Files changed (245) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/LICENSE +29 -0
  3. package/README.md +846 -2
  4. package/fonts/OFL.txt +93 -0
  5. package/fonts/inter-latin-400.woff +0 -0
  6. package/fonts/inter-latin-500.woff +0 -0
  7. package/fonts/inter-latin-600.woff +0 -0
  8. package/fonts/inter-latin-700.woff +0 -0
  9. package/package.json +124 -4
  10. package/recipes/aurora.json +132 -0
  11. package/recipes/bauhaus.json +113 -0
  12. package/recipes/bigType.json +103 -0
  13. package/recipes/brand.json +1143 -0
  14. package/recipes/contour.json +109 -0
  15. package/recipes/cutout.json +191 -0
  16. package/recipes/diagram.json +92 -0
  17. package/recipes/dither.json +170 -0
  18. package/recipes/duotone.json +75 -0
  19. package/recipes/gridTitle.json +136 -0
  20. package/recipes/iconTile.json +214 -0
  21. package/recipes/issue.json +221 -0
  22. package/recipes/mark.json +170 -0
  23. package/recipes/photo.json +156 -0
  24. package/recipes/riso.json +387 -0
  25. package/recipes/stripes.json +206 -0
  26. package/recipes/waveform.json +154 -0
  27. package/schema/recipe.schema.json +8822 -0
  28. package/src/animate/index.d.ts +19 -0
  29. package/src/animate/index.js +116 -0
  30. package/src/astro.d.ts +31 -0
  31. package/src/astro.js +86 -0
  32. package/src/builtins.js +4 -0
  33. package/src/color.js +246 -0
  34. package/src/diagram.js +248 -0
  35. package/src/effects/ascii.d.ts +7 -0
  36. package/src/effects/ascii.js +93 -0
  37. package/src/effects/buffer.d.ts +60 -0
  38. package/src/effects/buffer.js +472 -0
  39. package/src/effects/detail.d.ts +12 -0
  40. package/src/effects/detail.js +124 -0
  41. package/src/effects/digital.d.ts +14 -0
  42. package/src/effects/digital.js +216 -0
  43. package/src/effects/distort.d.ts +20 -0
  44. package/src/effects/distort.js +314 -0
  45. package/src/effects/dither.d.ts +8 -0
  46. package/src/effects/dither.js +147 -0
  47. package/src/effects/drop-shadow.d.ts +4 -0
  48. package/src/effects/drop-shadow.js +45 -0
  49. package/src/effects/extrude.d.ts +5 -0
  50. package/src/effects/extrude.js +55 -0
  51. package/src/effects/film.d.ts +11 -0
  52. package/src/effects/film.js +204 -0
  53. package/src/effects/glow.d.ts +8 -0
  54. package/src/effects/glow.js +56 -0
  55. package/src/effects/grade.d.ts +30 -0
  56. package/src/effects/grade.js +274 -0
  57. package/src/effects/halftone.d.ts +8 -0
  58. package/src/effects/halftone.js +95 -0
  59. package/src/effects/index.d.ts +125 -0
  60. package/src/effects/index.js +277 -0
  61. package/src/effects/ink.d.ts +12 -0
  62. package/src/effects/ink.js +70 -0
  63. package/src/effects/lens.d.ts +14 -0
  64. package/src/effects/lens.js +277 -0
  65. package/src/effects/light.d.ts +10 -0
  66. package/src/effects/light.js +59 -0
  67. package/src/effects/looks.d.ts +9 -0
  68. package/src/effects/looks.js +74 -0
  69. package/src/effects/mask.d.ts +52 -0
  70. package/src/effects/mask.js +314 -0
  71. package/src/effects/motion.d.ts +6 -0
  72. package/src/effects/motion.js +60 -0
  73. package/src/effects/newsprint.d.ts +6 -0
  74. package/src/effects/newsprint.js +89 -0
  75. package/src/effects/optics.d.ts +10 -0
  76. package/src/effects/optics.js +213 -0
  77. package/src/effects/options.d.ts +6 -0
  78. package/src/effects/options.js +106 -0
  79. package/src/effects/paint-presets.d.ts +10 -0
  80. package/src/effects/paint-presets.js +47 -0
  81. package/src/effects/paint.d.ts +49 -0
  82. package/src/effects/paint.js +66 -0
  83. package/src/effects/pixels.d.ts +24 -0
  84. package/src/effects/pixels.js +138 -0
  85. package/src/effects/polar.d.ts +10 -0
  86. package/src/effects/polar.js +265 -0
  87. package/src/effects/region.d.ts +8 -0
  88. package/src/effects/region.js +136 -0
  89. package/src/effects/round-border.d.ts +5 -0
  90. package/src/effects/round-border.js +62 -0
  91. package/src/effects/screen.d.ts +14 -0
  92. package/src/effects/screen.js +212 -0
  93. package/src/effects/sort.d.ts +8 -0
  94. package/src/effects/sort.js +125 -0
  95. package/src/effects/symmetry.d.ts +6 -0
  96. package/src/effects/symmetry.js +74 -0
  97. package/src/effects/tile.d.ts +7 -0
  98. package/src/effects/tile.js +55 -0
  99. package/src/effects/tone.d.ts +16 -0
  100. package/src/effects/tone.js +117 -0
  101. package/src/effects/transform.d.ts +35 -0
  102. package/src/effects/transform.js +127 -0
  103. package/src/effects/util.d.ts +16 -0
  104. package/src/effects/util.js +85 -0
  105. package/src/extract.js +91 -0
  106. package/src/flatten.js +234 -0
  107. package/src/fonts.d.ts +55 -0
  108. package/src/fonts.js +393 -0
  109. package/src/formats/cut.d.ts +10 -0
  110. package/src/formats/cut.js +77 -0
  111. package/src/formats/index.d.ts +6 -0
  112. package/src/formats/index.js +9 -0
  113. package/src/formats/presets.d.ts +41 -0
  114. package/src/formats/presets.js +89 -0
  115. package/src/formats/print.d.ts +25 -0
  116. package/src/formats/print.js +117 -0
  117. package/src/formats/zones.d.ts +10 -0
  118. package/src/formats/zones.js +64 -0
  119. package/src/geometry.js +187 -0
  120. package/src/grid.js +41 -0
  121. package/src/handmade.js +253 -0
  122. package/src/icons.js +191 -0
  123. package/src/index.d.ts +1083 -0
  124. package/src/index.js +27 -0
  125. package/src/inter-data.js +27 -0
  126. package/src/json-recipe.js +616 -0
  127. package/src/kit/index.d.ts +20 -0
  128. package/src/kit/index.js +58 -0
  129. package/src/layer-options.js +56 -0
  130. package/src/layers/barcode.d.ts +19 -0
  131. package/src/layers/barcode.js +63 -0
  132. package/src/layers/code128.d.ts +4 -0
  133. package/src/layers/code128.js +28 -0
  134. package/src/layers/expr.d.ts +6 -0
  135. package/src/layers/expr.js +121 -0
  136. package/src/layers/geometry.d.ts +6 -0
  137. package/src/layers/geometry.js +238 -0
  138. package/src/layers/index.d.ts +18 -0
  139. package/src/layers/index.js +15 -0
  140. package/src/layers/perforation.d.ts +14 -0
  141. package/src/layers/perforation.js +47 -0
  142. package/src/layers/repeat.d.ts +29 -0
  143. package/src/layers/repeat.js +90 -0
  144. package/src/layers/shape.d.ts +46 -0
  145. package/src/layers/shape.js +115 -0
  146. package/src/layers/soft.d.ts +5 -0
  147. package/src/layers/soft.js +43 -0
  148. package/src/layers/svg.d.ts +23 -0
  149. package/src/layers/svg.js +109 -0
  150. package/src/layers/table.d.ts +25 -0
  151. package/src/layers/table.js +80 -0
  152. package/src/layers/tear.d.ts +21 -0
  153. package/src/layers/tear.js +74 -0
  154. package/src/layers/texture.d.ts +17 -0
  155. package/src/layers/texture.js +106 -0
  156. package/src/layers/util.d.ts +8 -0
  157. package/src/layers/util.js +48 -0
  158. package/src/layers.js +1056 -0
  159. package/src/lint/image-size.d.ts +4 -0
  160. package/src/lint/image-size.js +34 -0
  161. package/src/lint/index.d.ts +16 -0
  162. package/src/lint/index.js +127 -0
  163. package/src/lint/rules.d.ts +5 -0
  164. package/src/lint/rules.js +19 -0
  165. package/src/node.d.ts +2 -0
  166. package/src/node.js +20 -0
  167. package/src/palette.js +185 -0
  168. package/src/platform/bytes.d.ts +22 -0
  169. package/src/platform/bytes.js +103 -0
  170. package/src/platform/compress.d.ts +12 -0
  171. package/src/platform/compress.js +81 -0
  172. package/src/platform/harfbuzz.d.ts +9 -0
  173. package/src/platform/harfbuzz.js +80 -0
  174. package/src/platform/index.d.ts +8 -0
  175. package/src/platform/index.js +13 -0
  176. package/src/platform/load.d.ts +6 -0
  177. package/src/platform/load.js +72 -0
  178. package/src/platform/no-harfbuzz.d.ts +2 -0
  179. package/src/platform/no-harfbuzz.js +11 -0
  180. package/src/platform/node.d.ts +26 -0
  181. package/src/platform/node.js +86 -0
  182. package/src/platform/settings.d.ts +28 -0
  183. package/src/platform/settings.js +51 -0
  184. package/src/png.js +126 -0
  185. package/src/print.js +659 -0
  186. package/src/raster/index.d.ts +24 -0
  187. package/src/raster/index.js +171 -0
  188. package/src/recipes.js +79 -0
  189. package/src/render/backdrop.d.ts +6 -0
  190. package/src/render/backdrop.js +55 -0
  191. package/src/render/content.d.ts +5 -0
  192. package/src/render/content.js +58 -0
  193. package/src/render/context.d.ts +82 -0
  194. package/src/render/grain.d.ts +7 -0
  195. package/src/render/grain.js +113 -0
  196. package/src/render/group.d.ts +23 -0
  197. package/src/render/group.js +67 -0
  198. package/src/render/key.d.ts +5 -0
  199. package/src/render/key.js +91 -0
  200. package/src/render/report.d.ts +5 -0
  201. package/src/render/report.js +19 -0
  202. package/src/render/tiles.d.ts +6 -0
  203. package/src/render/tiles.js +77 -0
  204. package/src/render/use.d.ts +27 -0
  205. package/src/render/use.js +73 -0
  206. package/src/render/wrap.d.ts +14 -0
  207. package/src/render/wrap.js +199 -0
  208. package/src/render.js +553 -0
  209. package/src/rng.js +95 -0
  210. package/src/svg.js +69 -0
  211. package/src/text.d.ts +29 -0
  212. package/src/text.js +237 -0
  213. package/src/type/auto-color.d.ts +9 -0
  214. package/src/type/auto-color.js +44 -0
  215. package/src/type/fallback.d.ts +11 -0
  216. package/src/type/fallback.js +92 -0
  217. package/src/type/glyphs.d.ts +24 -0
  218. package/src/type/glyphs.js +87 -0
  219. package/src/type/index.d.ts +5 -0
  220. package/src/type/index.js +10 -0
  221. package/src/type/kern.d.ts +4 -0
  222. package/src/type/kern.js +144 -0
  223. package/src/type/layout-ref.d.ts +10 -0
  224. package/src/type/layout-ref.js +74 -0
  225. package/src/type/line.d.ts +11 -0
  226. package/src/type/line.js +105 -0
  227. package/src/type/live.d.ts +6 -0
  228. package/src/type/live.js +39 -0
  229. package/src/type/name.d.ts +4 -0
  230. package/src/type/name.js +32 -0
  231. package/src/type/path.d.ts +18 -0
  232. package/src/type/path.js +89 -0
  233. package/src/type/pixel.d.ts +9 -0
  234. package/src/type/pixel.js +115 -0
  235. package/src/type/sfnt.d.ts +20 -0
  236. package/src/type/sfnt.js +258 -0
  237. package/src/type/spans.d.ts +33 -0
  238. package/src/type/spans.js +138 -0
  239. package/src/type/symbols.d.ts +7 -0
  240. package/src/type/symbols.js +89 -0
  241. package/src/type/typeset.d.ts +10 -0
  242. package/src/type/typeset.js +352 -0
  243. package/src/type/woff2.d.ts +6 -0
  244. package/src/type/woff2.js +301 -0
  245. package/src/version.js +4 -0
@@ -0,0 +1,109 @@
1
+ {
2
+ "$schema": "../schema/recipe.schema.json",
3
+ "name": "contour",
4
+ "description": "Topographic isolines of seeded noise on a flat field: thin even lines, an index contour every fifth line, one line in the accent.",
5
+ "params": {
6
+ "levels": null
7
+ },
8
+ "vars": {
9
+ "field": {
10
+ "mix": [
11
+ "@bg",
12
+ "@accent",
13
+ {
14
+ "if": {
15
+ "mode": "dark"
16
+ },
17
+ "then": 0.08,
18
+ "else": 0.05
19
+ }
20
+ ]
21
+ }
22
+ },
23
+ "layers": [
24
+ {
25
+ "id": "bg",
26
+ "type": "solid",
27
+ "color": "$field"
28
+ },
29
+ {
30
+ "id": "contour",
31
+ "type": "contour",
32
+ "levels": {
33
+ "if": "levels",
34
+ "then": "{levels}",
35
+ "else": {
36
+ "pick": [
37
+ 14,
38
+ 18,
39
+ 22,
40
+ 26,
41
+ 30
42
+ ]
43
+ }
44
+ },
45
+ "color": "@text",
46
+ "opacity": 0.42,
47
+ "index": 5,
48
+ "scale": {
49
+ "range": [
50
+ 1.8,
51
+ 3.2
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "id": "grain",
57
+ "type": "grain",
58
+ "amount": 0.035
59
+ },
60
+ {
61
+ "id": "title",
62
+ "type": "text",
63
+ "when": "title",
64
+ "content": "{title}",
65
+ "anchor": "bottom-left",
66
+ "weight": 500,
67
+ "size": {
68
+ "mul": [
69
+ "@u",
70
+ 0.062
71
+ ]
72
+ },
73
+ "minSize": {
74
+ "mul": [
75
+ "@u",
76
+ 0.046
77
+ ]
78
+ },
79
+ "lineHeight": 1.08,
80
+ "letterSpacing": -0.025,
81
+ "maxLines": 3,
82
+ "label": {
83
+ "if": "label",
84
+ "then": {
85
+ "color": "@text",
86
+ "content": "{label}"
87
+ }
88
+ },
89
+ "background": {
90
+ "color": "$field",
91
+ "radius": 0,
92
+ "padding": [
93
+ {
94
+ "mul": [
95
+ "@u",
96
+ 0.03
97
+ ]
98
+ },
99
+ {
100
+ "mul": [
101
+ "@u",
102
+ 0.035
103
+ ]
104
+ }
105
+ ]
106
+ }
107
+ }
108
+ ]
109
+ }
@@ -0,0 +1,191 @@
1
+ {
2
+ "$schema": "../schema/recipe.schema.json",
3
+ "name": "cutout",
4
+ "description": "A flat matte field (or a hand-cut panel on the page colour) with cut-paper shapes and a hand-drawn icon or node graph.",
5
+ "params": {
6
+ "panel": false,
7
+ "shapes": null,
8
+ "graph": false,
9
+ "stroke": null
10
+ },
11
+ "vars": {
12
+ "field": {
13
+ "tone": [
14
+ "@accent",
15
+ {
16
+ "l": [
17
+ 0.52,
18
+ 0.64
19
+ ],
20
+ "c": [
21
+ 0.05,
22
+ 0.11
23
+ ]
24
+ }
25
+ ]
26
+ },
27
+ "count": {
28
+ "if": {
29
+ "shapes": null
30
+ },
31
+ "then": {
32
+ "if": "panel",
33
+ "then": 0,
34
+ "else": 3
35
+ },
36
+ "else": "{shapes}"
37
+ },
38
+ "ink": {
39
+ "if": {
40
+ "stroke": "light"
41
+ },
42
+ "then": "#faf9f5",
43
+ "else": {
44
+ "if": {
45
+ "stroke": "dark"
46
+ },
47
+ "then": "#141413",
48
+ "else": {
49
+ "if": "panel",
50
+ "then": "#faf9f5",
51
+ "else": {
52
+ "if": "graph",
53
+ "then": "#141413",
54
+ "else": {
55
+ "if": {
56
+ "shapes": 0
57
+ },
58
+ "then": "#faf9f5",
59
+ "else": "#141413"
60
+ }
61
+ }
62
+ }
63
+ }
64
+ },
65
+ "type": {
66
+ "readable": [
67
+ {
68
+ "if": "panel",
69
+ "then": "@bg",
70
+ "else": "$field"
71
+ },
72
+ 4.5,
73
+ "white"
74
+ ]
75
+ }
76
+ },
77
+ "layers": [
78
+ {
79
+ "id": "bg",
80
+ "type": "solid",
81
+ "color": {
82
+ "if": "panel",
83
+ "then": "@bg",
84
+ "else": "$field"
85
+ }
86
+ },
87
+ {
88
+ "id": "panel",
89
+ "type": "paper",
90
+ "when": "panel",
91
+ "items": [
92
+ {
93
+ "kind": "rect",
94
+ "x": 0.5,
95
+ "y": 0.5,
96
+ "width": {
97
+ "mul": [
98
+ "@width",
99
+ 0.64
100
+ ]
101
+ },
102
+ "height": {
103
+ "mul": [
104
+ "@height",
105
+ 0.6
106
+ ]
107
+ }
108
+ }
109
+ ],
110
+ "region": {
111
+ "x": 0,
112
+ "y": 0,
113
+ "width": 1,
114
+ "height": 1
115
+ },
116
+ "color": "$field",
117
+ "wobble": 0.3
118
+ },
119
+ {
120
+ "id": "shapes",
121
+ "type": "paper",
122
+ "count": "$count",
123
+ "region": {
124
+ "x": 0.24,
125
+ "y": 0.22,
126
+ "width": 0.52,
127
+ "height": 0.56
128
+ }
129
+ },
130
+ {
131
+ "id": "icon",
132
+ "type": "scribble",
133
+ "when": {
134
+ "not": "graph"
135
+ },
136
+ "icon": "{icon}",
137
+ "color": "$ink",
138
+ "size": {
139
+ "if": "panel",
140
+ "then": "34vmin",
141
+ "else": "44vmin"
142
+ },
143
+ "stroke": "1.6vmin"
144
+ },
145
+ {
146
+ "id": "graph",
147
+ "type": "scribble",
148
+ "when": "graph",
149
+ "graph": true,
150
+ "color": "$ink",
151
+ "size": "52vmin",
152
+ "stroke": "1.7vmin"
153
+ },
154
+ {
155
+ "id": "grain",
156
+ "type": "grain",
157
+ "amount": 0.035
158
+ },
159
+ {
160
+ "id": "title",
161
+ "type": "text",
162
+ "when": "title",
163
+ "content": "{title}",
164
+ "anchor": "bottom-left",
165
+ "weight": 500,
166
+ "size": {
167
+ "mul": [
168
+ "@u",
169
+ 0.066
170
+ ]
171
+ },
172
+ "minSize": {
173
+ "mul": [
174
+ "@u",
175
+ 0.048
176
+ ]
177
+ },
178
+ "lineHeight": 1.08,
179
+ "letterSpacing": -0.025,
180
+ "maxLines": 3,
181
+ "label": {
182
+ "if": "label",
183
+ "then": {
184
+ "color": "$type",
185
+ "content": "{label}"
186
+ }
187
+ },
188
+ "color": "$type"
189
+ }
190
+ ]
191
+ }
@@ -0,0 +1,92 @@
1
+ {
2
+ "$schema": "../schema/recipe.schema.json",
3
+ "name": "diagram",
4
+ "description": "White line-art over the gradient field: one icon, or nodes in outlined tiles joined by arrows, with a dotted grid that breaks around them (the engineering-blog look).",
5
+ "params": {
6
+ "nodes": null,
7
+ "layout": null,
8
+ "arrows": null
9
+ },
10
+ "layers": [
11
+ {
12
+ "id": "bg",
13
+ "type": "solid"
14
+ },
15
+ {
16
+ "id": "mesh",
17
+ "type": "mesh",
18
+ "count": 4,
19
+ "blur": "11vmax",
20
+ "size": [
21
+ 0.45,
22
+ 0.8
23
+ ],
24
+ "streak": 1.8,
25
+ "tone": {
26
+ "l": [
27
+ 0.4,
28
+ 0.6
29
+ ],
30
+ "c": [
31
+ 0.14,
32
+ 0.24
33
+ ]
34
+ },
35
+ "fold": {
36
+ "pick": [
37
+ false,
38
+ false,
39
+ {
40
+ "sheen": 0
41
+ }
42
+ ]
43
+ },
44
+ "hueSpan": 60
45
+ },
46
+ {
47
+ "id": "diagram",
48
+ "type": "diagram",
49
+ "icon": "{icon}",
50
+ "nodes": "{nodes}",
51
+ "layout": "{layout}",
52
+ "arrows": "{arrows}",
53
+ "grid": true
54
+ },
55
+ {
56
+ "id": "grain",
57
+ "type": "grain",
58
+ "amount": 0.07
59
+ },
60
+ {
61
+ "id": "title",
62
+ "type": "text",
63
+ "when": "title",
64
+ "content": "{title}",
65
+ "anchor": "bottom-left",
66
+ "weight": 500,
67
+ "size": {
68
+ "mul": [
69
+ "@u",
70
+ 0.066
71
+ ]
72
+ },
73
+ "minSize": {
74
+ "mul": [
75
+ "@u",
76
+ 0.048
77
+ ]
78
+ },
79
+ "lineHeight": 1.08,
80
+ "letterSpacing": -0.025,
81
+ "maxLines": 3,
82
+ "label": {
83
+ "if": "label",
84
+ "then": {
85
+ "color": "#ffffff",
86
+ "content": "{label}"
87
+ }
88
+ },
89
+ "color": "#ffffff"
90
+ }
91
+ ]
92
+ }
@@ -0,0 +1,170 @@
1
+ {
2
+ "$schema": "../schema/recipe.schema.json",
3
+ "name": "dither",
4
+ "description": "A soft field (noise, a gradient, or a lit sphere / arch / circle) rendered 1-bit at a visible pixel size: Bayer 4\u00d74 / 8\u00d78 or blue-ish noise, in two colours or three.",
5
+ "params": {
6
+ "matrix": "bayer4",
7
+ "cell": "0.9vmin",
8
+ "source": null,
9
+ "shape": null,
10
+ "three": false
11
+ },
12
+ "vars": {
13
+ "ink": {
14
+ "tone": [
15
+ "@accent",
16
+ {
17
+ "if": {
18
+ "mode": "dark"
19
+ },
20
+ "then": {
21
+ "l": [
22
+ 0.62,
23
+ 0.85
24
+ ],
25
+ "c": [
26
+ 0.1,
27
+ 0.22
28
+ ]
29
+ },
30
+ "else": {
31
+ "l": [
32
+ 0.3,
33
+ 0.55
34
+ ],
35
+ "c": [
36
+ 0.1,
37
+ 0.24
38
+ ]
39
+ }
40
+ }
41
+ ]
42
+ },
43
+ "colors": {
44
+ "if": "three",
45
+ "then": [
46
+ "@bg",
47
+ {
48
+ "tone": [
49
+ "@colors.1",
50
+ {
51
+ "l": [
52
+ 0.55,
53
+ 0.75
54
+ ],
55
+ "c": [
56
+ 0.1,
57
+ 0.2
58
+ ]
59
+ }
60
+ ]
61
+ },
62
+ "$ink"
63
+ ],
64
+ "else": [
65
+ "@bg",
66
+ "$ink"
67
+ ]
68
+ }
69
+ },
70
+ "output": {
71
+ "lossless": true
72
+ },
73
+ "layers": [
74
+ {
75
+ "id": "dither",
76
+ "type": "dither",
77
+ "colors": "$colors",
78
+ "source": {
79
+ "if": "source",
80
+ "then": "{source}",
81
+ "else": {
82
+ "pick": [
83
+ "field",
84
+ "linear",
85
+ "radial"
86
+ ]
87
+ }
88
+ },
89
+ "shape": {
90
+ "if": "shape",
91
+ "then": "{shape}",
92
+ "else": {
93
+ "pick": [
94
+ "sphere",
95
+ "none",
96
+ "circle",
97
+ "arch",
98
+ "sphere"
99
+ ]
100
+ }
101
+ },
102
+ "matrix": "{matrix}",
103
+ "cell": "{cell}",
104
+ "center": {
105
+ "x": {
106
+ "range": [
107
+ 0.4,
108
+ 0.6
109
+ ]
110
+ },
111
+ "y": {
112
+ "range": [
113
+ 0.38,
114
+ 0.55
115
+ ]
116
+ }
117
+ },
118
+ "size": "28vmin"
119
+ },
120
+ {
121
+ "id": "title",
122
+ "type": "text",
123
+ "when": "title",
124
+ "content": "{title}",
125
+ "anchor": "bottom-left",
126
+ "weight": 500,
127
+ "size": {
128
+ "mul": [
129
+ "@u",
130
+ 0.062
131
+ ]
132
+ },
133
+ "minSize": {
134
+ "mul": [
135
+ "@u",
136
+ 0.046
137
+ ]
138
+ },
139
+ "lineHeight": 1.08,
140
+ "letterSpacing": -0.025,
141
+ "maxLines": 3,
142
+ "label": {
143
+ "if": "label",
144
+ "then": {
145
+ "color": "@text",
146
+ "content": "{label}"
147
+ }
148
+ },
149
+ "color": "@text",
150
+ "background": {
151
+ "color": "@bg",
152
+ "radius": 0,
153
+ "padding": [
154
+ {
155
+ "mul": [
156
+ "@u",
157
+ 0.03
158
+ ]
159
+ },
160
+ {
161
+ "mul": [
162
+ "@u",
163
+ 0.035
164
+ ]
165
+ }
166
+ ]
167
+ }
168
+ }
169
+ ]
170
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "$schema": "../schema/recipe.schema.json",
3
+ "name": "duotone",
4
+ "description": "A photo mapped to the palette's shadow and highlight colours, with grain, and a title over a scrim when given.",
5
+ "requires": [
6
+ "image"
7
+ ],
8
+ "vars": {
9
+ "shadow": {
10
+ "if": {
11
+ "mode": "dark"
12
+ },
13
+ "then": "@bg",
14
+ "else": "@text"
15
+ }
16
+ },
17
+ "layers": [
18
+ {
19
+ "id": "image",
20
+ "type": "image",
21
+ "src": "{image}",
22
+ "duotone": true
23
+ },
24
+ {
25
+ "id": "scrim",
26
+ "type": "linear",
27
+ "when": "title",
28
+ "angle": 180,
29
+ "colors": [
30
+ "$shadow",
31
+ "$shadow"
32
+ ],
33
+ "opacities": [
34
+ 0,
35
+ 0.62
36
+ ]
37
+ },
38
+ {
39
+ "id": "grain",
40
+ "type": "grain",
41
+ "amount": 0.07
42
+ },
43
+ {
44
+ "id": "title",
45
+ "type": "text",
46
+ "when": "title",
47
+ "content": "{title}",
48
+ "anchor": "bottom-left",
49
+ "weight": 500,
50
+ "size": {
51
+ "mul": [
52
+ "@u",
53
+ 0.066
54
+ ]
55
+ },
56
+ "minSize": {
57
+ "mul": [
58
+ "@u",
59
+ 0.048
60
+ ]
61
+ },
62
+ "lineHeight": 1.08,
63
+ "letterSpacing": -0.025,
64
+ "maxLines": 3,
65
+ "label": {
66
+ "if": "label",
67
+ "then": {
68
+ "color": "#e9e9e9",
69
+ "content": "{label}"
70
+ }
71
+ },
72
+ "color": "#ffffff"
73
+ }
74
+ ]
75
+ }