# Cubeshape (Image generator for sq-1)



## primarycuber (Nov 9, 2014)

*Cubeshape (Yet another image generator for sq-1)*

*What is this*:
Yet another image generator for square-1.
The source code can be found here.

*How to use it?*

```
https://cubeshape.herokuapp.com/cubeshape/[shape]
```
Where [shape] is formed from *c* (corner) and *e* (edge) characters.
The default image size is 200px, but can be set via the *size* query parameter.

The default color is dark grey, but everything (including side stickers) can be set via the *colors* query parameter.


```
Color codes:
d: darkgrey
w: white
y: yellow
o: orange
r: red
g: green
b: blue
```

If _colors.length <= shape.lengt_ only the pieces will be colored, else you need to provide 3 colors for corners (color, left side, right side) and 2 colors for edges (color, side).
You can use any non-alphanumeric character as a separator between the color blocks.

*Examples*:

*default colors, default size*

```
https://cubeshape.herokuapp.com/cubeshape/eeccccc
```







*size set to 350*

```
https://cubeshape.herokuapp.com/cubeshape/eeeecceeee?size=350
```






*colored pieces*

```
https://cubeshape.herokuapp.com/cubeshape/eccecece?colors=wwyyyyyy
```






*colored pieces with side stickers*

```
https://cubeshape.herokuapp.com/cubeshape/ceceecec?&colors=yrb_yb_ybo_yo_wr_wr_g_wg_wgo
```






*parity*

```
https://cubeshape.herokuapp.com/cubeshape/cececece?&colors=yrb_yb_ybo_yo_yog_yr_ygr_yg
```


----------



## StachuK1992 (Nov 9, 2014)

Fantastic!
I'm surprised no one has created a sq-1 image generator before. (at least not to my knowledge)

This is a great start, and the images seem pretty clean.


----------



## Lid (Nov 9, 2014)

Andrew Nelson already did a script years ago, http://crunchatize.me/imsq.php

Also see: https://www.speedsolving.com/forum/...ng-quot-thread&p=772529&viewfull=1#post772529


----------



## qqwref (Nov 9, 2014)

Lid said:


> Andrew Nelson already did a script years ago, http://crunchatize.me/imsq.php


If you wanna see it in action: http://crunchatize.me/imsq.php?shap...kers=yywyyywwwwyywwywggrgoobbobrrggrgorobobrb


----------



## primarycuber (Nov 9, 2014)

qqwref said:


> If you wanna see it in action: http://crunchatize.me/imsq.php?shap...kers=yywyyywwwwyywwywggrgoobbobrrggrgorobobrb



Nice, haven't seen it before.

---

I added piece / side sticker coloring + updated the description.
I guess it's kinda finished now


----------

