Skip to content
BDR-ProPublic

About

Turn any image to rubic ready image

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🧊 Rubik Image Converter

Convert any picture into a Rubik's Cube-style mosaic, using only official Rubik cube colors (red, green, blue, white, yellow, orange). The script calculates how many cube pieces you need and the size of the frame.


📁 Folder Structure

rubic/
├── image_to_rubic.py
├── your_image.png
├── rubik_output.png       # Output image (autogenerated)

🖥️ How to Use

  1. Put your image in the same folder as the script.
  2. Open your terminal in that folder.
  3. Run the script with:
python image_to_rubic.py your_image.png 12000

Where:

  • your_image.png is your input image.
  • 12000 is the number of Rubik cubes you want to use.

🖼️ Example Output

[✅] Rubik-style image saved as 'rubik_output.png'.
[📏] Required Rubik frame: 109x109 cubes
[📐] Total frame size: 218 cm x 218 cm

🎨 Rubik Colors Used

  • 🔴 Red
  • 🟠 Orange
  • 🟡 Yellow
  • 🟢 Green
  • 🔵 Blue
  • ⚪ White

🔧 Requirements

Make sure to install dependencies:

pip install pillow numpy

📐 Assumptions

  • Each Rubik tile is 2 cm x 2 cm.
  • Final frame size is calculated based on number of cubes per side.

Example results

Original Rubik Output

About

Turn any image to rubic ready image

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages