Skip to content

Easily create custom 9-slice menu boxes, highlight assets, and progress bars for any GRUB theme—no graphic design required!

Notifications You must be signed in to change notification settings

Lumexio/GRUB-Styled-Box-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

GRUB Styled Box Generator

Easily create custom 9-slice menu boxes, highlight assets, and progress bars for any GRUB theme—no graphic design required!


🎨 What is this?

GRUB Styled Box Generator is a Python tool for anyone designing a GRUB theme.
It interactively generates the 9-slice image assets needed for GRUB menu boxes, highlights, and progress bars.
The script is fully customizable—choose your dimensions, colors, border styles, and more.

Whether you want classic, Y2K, cyberfunk, neon, minimal, or any other look, this tool helps you rapidly prototype and produce styled box images for your GRUB theme.
No need to use Inkscape or slice images manually—just answer a few prompts!


✨ Features

  • Interactive setup: Select menu box, highlight, progress bar, or all at once.
  • Customizable colors & dimensions: Define fill/glow, border, highlight overlays, and slice sizes.
  • Border styles: Solid, dashed, or double—pick for each asset set.
  • Font support: Use a default or specify your own font file.
  • Preview mockup: Instantly visualize your assembled box as it will appear in GRUB.
  • Batch generation: Create multiple asset sets in one run.
  • Standard output: PNG images named for GRUB’s 9-slice system (slice_nw.png, slice_c.png, etc.) and preview images.
  • General-purpose: Works for any style or color palette—perfect for all users, not just for a specific aesthetic.

🚀 Installation

  1. Install Python 3.7+

  2. Install Pillow (Python Imaging Library):

    pip install pillow
  3. Download styled_box_generator.py (see script here).


🕹️ Usage

Run the generator script:

python styled_box_generator.py

The script will interactively guide you through:

  • Selecting which box type(s) to generate (menu, highlight, progress bar, or all)
  • Entering dimensions (or using defaults)
  • Choosing colors (or using defaults)
  • Picking border style (solid, dashed, double)
  • Optionally specifying a font
  • Setting preview/mockup size

Example Session:

Which box type do you want to generate? (1-4) [default: 4]:
Corner (nw, ne, sw, se) [default: 32,32]:
Fill/Glow color (hex or R,G,B) [default: #ff66ff]:
Border/Stroke color (hex or R,G,B) [default: #00ccff]:
Highlight overlay color (hex or R,G,B) [default: #ffffff]:
Choose border style (1/2/3) [default: 1]:
...
Preview saved to menu_box/preview_box.png
All slices for 'menu box' saved to menu_box/

Output

  • 9 slice PNGs per box type:
    slice_nw.png, slice_n.png, slice_ne.png, slice_w.png, slice_c.png, slice_e.png, slice_sw.png, slice_s.png, slice_se.png
  • Preview mockup:
    preview_box.png (shows the full assembled box as it will look in GRUB)

⚡ Customization

  • Dimensions: Choose pixel sizes for corners, sides, center, and preview.
  • Colors: Any valid hex (#RRGGBB) or RGB (R,G,B) values.
  • Border Styles:
    • solid: Clean, strong outline
    • dashed: Retro, glitchy vibes
    • double: Layered, cyber borders
  • Font: Use default or specify a path to a TTF/OTF font file.
  • Batch Generation: Generate all box types at once.

🖼️ Screenshots & Previews

(Add your generated preview images here!)


🛠️ Technical Details

  • Built with: Python & Pillow
  • Works on: Any OS with Python and Pillow
  • For: Any GRUB theme creator—classic, modern, neon, Y2K, minimalist, you name it!

🙌 Credits


📄 License

MIT (or specify your preferred license)


💬 Feedback & Contributions

Issues, ideas, and pull requests welcome!

About

Easily create custom 9-slice menu boxes, highlight assets, and progress bars for any GRUB theme—no graphic design required!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published