From 6a8630a00d347a3a70aaeb6c172e6a7edab67ab2 Mon Sep 17 00:00:00 2001 From: emil28092005 Date: Sat, 9 May 2026 13:30:43 +0300 Subject: [PATCH] Add colours generator. --- .../generators/ColorGenerator.astro | 134 ++++++++++++++++++ src/data/generators.ts | 2 +- src/pages/generators/colors.astro | 63 ++++++++ 3 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 src/components/generators/ColorGenerator.astro create mode 100644 src/pages/generators/colors.astro diff --git a/src/components/generators/ColorGenerator.astro b/src/components/generators/ColorGenerator.astro new file mode 100644 index 0000000..38e6b76 --- /dev/null +++ b/src/components/generators/ColorGenerator.astro @@ -0,0 +1,134 @@ +--- +--- + +
+ + +
+ +
+ + +
+ {[ + { id: 'cg-hex', label: 'HEX' }, + { id: 'cg-rgb', label: 'RGB' }, + { id: 'cg-hsl', label: 'HSL' }, + ].map(({ id, label }) => ( +
+ + {label} + + + +
+ ))} +
+ + +
+ +
+
+ + diff --git a/src/data/generators.ts b/src/data/generators.ts index df3b080..91e039a 100644 --- a/src/data/generators.ts +++ b/src/data/generators.ts @@ -19,7 +19,7 @@ export const generators: Generator[] = [ title: 'Color', description: 'Generate a random color in HEX, RGB, or HSL format.', icon: 'palette', - status: 'coming-soon', + status: 'live', }, { slug: 'password', diff --git a/src/pages/generators/colors.astro b/src/pages/generators/colors.astro new file mode 100644 index 0000000..fb9f4b9 --- /dev/null +++ b/src/pages/generators/colors.astro @@ -0,0 +1,63 @@ +--- +import BaseLayout from '../../layouts/BaseLayout.astro'; +import ColorGenerator from '../../components/generators/ColorGenerator.astro'; +import AdBanner from '../../components/AdBanner.astro'; +import { generators } from '../../data/generators'; + +const generator = generators.find((g) => g.slug === 'colors')!; +--- + + +
+ + +
+
+ + randify +
+

+ {generator.title} Generator +

+

{generator.description}

+
+ +
+ +
+ +
+ + + +
+
+