# Flat UI colors: http://flatuicolors.com/ flat_ui_colors = {'Alizarin': (231, 76, 60), 'Pomegranate': (192, 57, 43), 'Carrot': (230, 126, 34), 'Pumpkin': (211, 84, 0), 'Sun Flower': (241, 196, 15), 'Orange': (243, 156, 18), 'Emerald': (46, 204, 113), 'Nephritis': (39, 174, 96), 'Turquoise': (26, 188, 156), 'Green Sea': (22, 160, 133), 'Peter River': (52, 152, 219), 'Belize Hole': (41, 128, 185), 'Amethyst': (155, 89, 182), 'Wisteria': (142, 68, 173), 'Wet Asphalt': (52, 73, 94), 'Midnight Blue': (44, 62, 80), 'Concrete': (149, 165, 166), 'Asbestos': (127, 140, 141), 'Clouds': (236, 240, 241), 'Silver': (189, 195, 199)}
from ipythonblocks import BlockGrid
grid = BlockGrid(21, 21, fill=flat_ui_colors['Clouds'])
grid
# Flat UI colors: http://flatuicolors.com/ flat_ui_colors = {'Alizarin': (231, 76, 60), 'Pomegranate': (192, 57, 43), 'Carrot': (230, 126, 34), 'Pumpkin': (211, 84, 0), 'Sun Flower': (241, 196, 15), 'Orange': (243, 156, 18), 'Emerald': (46, 204, 113), 'Nephritis': (39, 174, 96), 'Turquoise': (26, 188, 156), 'Green Sea': (22, 160, 133), 'Peter River': (52, 152, 219), 'Belize Hole': (41, 128, 185), 'Amethyst': (155, 89, 182), 'Wisteria': (142, 68, 173), 'Wet Asphalt': (52, 73, 94), 'Midnight Blue': (44, 62, 80), 'Concrete': (149, 165, 166), 'Asbestos': (127, 140, 141), 'Clouds': (236, 240, 241), 'Silver': (189, 195, 199)} borders = flat_ui_colors['Wet Asphalt'] letters = flat_ui_colors['Peter River'] plus = flat_ui_colors['Nephritis'] heart = flat_ui_colors['Alizarin']
# border grid[:, 0] = borders grid[:, -1] = borders grid[0, :] = borders grid[-1, :] = borders
grid
# dividers grid[:, 10] = borders grid[10, :] = borders
grid
# T grid[2, 2:2 + 7] = letters grid[3:3 + 6, 5] = letters # + grid[5, 13:13 + 5] = plus grid[3:3 + 5, 15] = plus # M grid[12:12 + 7, 12] = letters grid[12:12 + 7, 18] = letters for b in [(13, 13), (14, 14), (15, 15), (14, 16), (13, 17)]: grid[b] = letters # <3 starts = [(13, 2), (12, 3), (12, 4), (13, 5), (12, 6), (12, 7), (13, 8)] depths = [2, 4, 5, 5, 5, 4, 2] for s, d in zip(starts, depths): grid[s[0]:s[0] + d, s[1]] = heart
grid
grid[12:12 + 7, 12]
grid[12:12 + 8, 12]
grid[12:12 + 9, 12]
grid[12:12 + 9, 11]
grid[12:12 + 9, 12]
grid.post_to_web(':')