From 086129d3aeb04151ae5b72b11e76f47ded047669 Mon Sep 17 00:00:00 2001 From: evanpelle Date: Wed, 24 Sep 2025 18:31:19 -0700 Subject: [PATCH] colors --- src/core/Schemas.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/core/Schemas.ts b/src/core/Schemas.ts index 0cea2c8e8..2218b89a2 100644 --- a/src/core/Schemas.ts +++ b/src/core/Schemas.ts @@ -395,10 +395,22 @@ export const PlayerPatternSchema = z.object({ patternData: PatternDataSchema, colorPalette: ColorPaletteSchema.optional(), }); + +export const PlayerColorSchema = z.object({ + color: z + .string() + .regex( + /^#[0-9A-Fa-f]{6}$/, + "Color must be a valid hex code (e.g., #FF0000)", + ), +}); + export const PlayerCosmeticsSchema = z.object({ flag: FlagSchema.optional(), pattern: PlayerPatternSchema.optional(), + color: PlayerColorSchema.optional(), }); + export const PlayerSchema = z.object({ clientID: ID, username: UsernameSchema,