Warnain 🎨
Smart color tools for everything language.
Tired of copying a color from the web (rgba or hsla) and manually converting it to Color(0xFF...) for Flutter, ImVec4(...) for C++, or #AARRGGBB for Android XML?
Warnain solves this by providing a universal color parser and a context-aware formatter. Just paste any color format into your code, click the VS Code color picker, and Warnain will automatically rewrite it into the valid syntax for your current programming language.
✨ Killer Features
- Frictionless Copy-Paste: Paste standard Web colors (Hex, RGBA, HSLA) directly into Mobile or Game engines without manual conversion.
- Smart Auto-Format: Just click the color box once, and it instantly transforms into the exact code snippet required by your active file.
- String Support: Detects and safely formats colors hidden inside strings
"" or comments // without breaking your code structure.
- Universal yet Specific: Covers UI ecosystems across Web, Mobile, Desktop, and Game Development.
🚀 Supported Ecosystems
Warnain intelligently adapts its output based on the file you are editing:
📱 Mobile & Desktop
- Dart / Flutter:
Color(0xAARRGGBB)
- Kotlin (Compose):
Color(0xAARRGGBB)
- Java (Android/JavaFX):
Color.argb(a, r, g, b)
- Swift & Python (Tkinter/PyQt): Clean Hex strings (
#RRGGBB or #AARRGGBB)
- XML (Android UI): Clean Hex ARGB
🎮 Game Development
- Godot (GDScript):
Color(r, g, b, a) (Float 0.0 - 1.0)
- C++ (Dear ImGui):
ImVec4(r, g, b, a) (Float 0.0f - 1.0f)
- C# (Unity):
new Color(r, g, b, a)
- Lua (Roblox):
Color3.fromRGB(r, g, b)
🌐 Web & Templating
Seamless cycle between RGBA ⭢ HEX ⭢ HSLA for:
- React (
.jsx, .tsx), Vue, Svelte, Astro
- Laravel Blade, Phoenix Heex, PHP
- HTML, Pug, Markdown, MDX
- JSON, YAML (Great for config files & design tokens)
💡 How to Use
- Copy a color from Figma, a website, or a design document (e.g.,
hsla(120, 100%, 50%, 0.8)).
- Paste it into your file (Tip: wrap it in quotes
"..." if your linter complains about invalid syntax).
- Click the color square provided by Warnain.
- Watch it instantly convert to the native format of your language!
⚙️ Requirements
No complex setup needed. Warnain acts as a smart layer on top of VS Code's native color picker.
📝 License
This extension is proprietary. It is completely free to download and use via the official Visual Studio Code Marketplace.
(All rights reserved. You may not copy, modify, distribute, or sell the source code without explicit permission).
| |