Transform any word into a unique hex color! This project includes both a web interface and a Farcaster Frame for social media integration.
- Word-to-Color Generation: Consistent color mapping using hash functions
- AI-Generated Color Names: Creative color names powered by Gemini AI
- Multiple Color Formats: Hex, RGB, and HSL display
- Color History: Remember last 12 generated colors
- Farcaster Frame: Interactive mini-app for social media
- Dynamic Image Generation: Server-side frame images using Jimp
- Copy to Clipboard: Easy color code copying
- Responsive Design: Works on desktop and mobile
- Update Frame URLs: Replace
localhost:3003
with your deployed URL in any hardcoded references - Test Frame: Share your deployment URL in a Farcaster client like Warpcast
- Monitor: Check AWS CloudWatch logs for any issues
-
Share the URL: Post your deployed frame URL in a Farcaster cast
-
Interact: Users can:
- Type words in the input field
- Click "Generate Color" to see the hex color
- Use "Random" for surprise colors
- Copy hex codes with "Copy Hex" button
- Generate new words with "New Word"
-
Create serverless.yml (requires code restructuring)
- Push code to GitHub repository
- Set up AWS account and credentials
- Choose deployment method
- Configure environment variables if needed
- Update frame URLs after deployment
- Test in Farcaster client
Frame URL for Farcaster: https://jnwh37f4xf.us-east-2.awsapprunner.com/
Frame Preview URL (for testing in browser): https://jnwh37f4xf.us-east-2.awsapprunner.com/frame.html
To test your Frame:
- For Farcaster clients: Copy the main URL and paste it in a Warpcast cast
- For browser preview: Use the
/frame.html
URL to see the fallback view - Create a new cast in Warpcast or your preferred Farcaster client
- Paste the main URL in your cast
- Publish the cast and interact with the Frame buttons
-
Install dependencies:
npm install
-
Start the server:
npm start
-
Open
http://localhost:3003
in your browser
After deployment, test your frame by:
- Copying your deployed URL
- Creating a cast in Farcaster with the URL
- Interacting with the frame buttons
PORT
: Server port (default: 3003)NODE_ENV
: Environment (development/production)
- express: Web server framework
- jimp: Image processing for frame generation
- sharp: High-performance image processing (optional)
- Generate Color: Create color from input word
- Random: Generate random color combinations
- Copy Hex: Display hex code prominently
- New Word: Reset for new input
ColorCodeGenerator/
├── server.js # Main server file
├── index.html # Web app interface
├── frame.html # Static frame fallback
├── style.css # Web app styles
├── frame-style.css # Frame styles
├── script.js # Client-side logic
├── package.json # Dependencies
└── apprunner.yaml # AWS App Runner config