Hey Guys ๐
Iโm still learning โ not a full-stack expert, not building a huge startup โ just someone who likes playing with code and visuals.
I recently made this little tool: you type a mood (like โdreamy oceanโ, โsunset hustleโ, or โcalm coding flowโ) and it generates a background gradient and a fresh motivational quote for you. If youโve got your own server/API key, it can even call an AI backend to make totally custom gradients + quotes.
โ What it does
- If you pick from predefined moods (Happy, Calm, Sad, Energetic), it uses preset gradients + quotes.
- If you choose โAIโ mode and type your own prompt, the tool will:
- Send the prompt to a backend endpoint /generate-gradient
- Receive a custom gradient (2 HEX colours) + a quote from AI
- Apply the gradient and adjust the text colour automatically so itโs always readable
๐ Why I built it
I wanted something more than static themes: a tool that feels your mood and paints accordingly. Also, I found learning this colour-contrast logic (checking brightness and adjusting text colour) surprisingly fun.
๐งฉ Tech bits
- Frontend: HTML + CSS + vanilla JS โ no big framework.
- Backend (optional): Express + Node โ endpoint accepts JSON { prompt } and returns { gradient, quote }.
- Bonus: client-side checks for URL validity, fallback when server is missing, and smooth background + text transition. ๐ Try it out
Would love your feedback โ is the colour contrast good? Does the quote feel fresh?
Thanks for checking this out โ and if youโre building your own little tool too, drop your link below!
๐ฌ Would love to hear your thoughts โ drop a comment if you tried it, found a bug, or have an idea to improve it!
โNaman Sachdeva
Top comments (0)