diff --git a/lib/pages/creature-page.tsx b/lib/pages/creature-page.tsx
index 48a3f7a..b5985c8 100644
--- a/lib/pages/creature-page.tsx
+++ b/lib/pages/creature-page.tsx
@@ -28,6 +28,7 @@ import { ColorWidget } from "../color-widget";
import { NumericSlider } from "../numeric-slider";
import { DEFAULT_BG_COLOR } from "../colors";
import { Checkbox } from "../checkbox";
+import { createRandomColorPalette } from "../random-colors";
/** Symbols that can be the "root" (i.e., main body) of a creature. */
const ROOT_SYMBOLS = SvgVocabulary.items.filter(
@@ -192,6 +193,11 @@ export const CreaturePage: React.FC<{}> = () => {
rng: new Random(randomSeed),
randomlyInvert,
});
+ const randomizeColors = () => {
+ const [bgColor, stroke, fill] = createRandomColorPalette(3);
+ setBgColor(bgColor);
+ setSymbolCtx({ ...symbolCtx, stroke, fill });
+ };
return (
<>
@@ -199,6 +205,11 @@ export const CreaturePage: React.FC<{}> = () => {
{" "}
+
+
+
= () => {
const circle2SymbolCtx = invertCircle2 ? swapColors(symbolCtx) : symbolCtx;
+ const randomizeColors = () => {
+ const [bgColor, stroke, fill] = createRandomColorPalette(3);
+ setBgColor(bgColor);
+ setBaseSymbolCtx({ ...baseSymbolCtx, stroke, fill });
+ };
+
const circles = [
,
];
@@ -293,6 +300,11 @@ export const MandalaPage: React.FC<{}> = () => {
onChange={setBgColor}
/>{" "}
+
+
+