- Added
show_color_triple
function as a convenience for displaying (red, green, blue) triplets without breaking them out into components - Added
Color
wrapper for colors in thecolors
andfui_colors
dictionaries to support.red
,.green
, and.blue
attribute access for the component colors
- Add
clear
function - Use
clear_output(wait=True)
to avoid flickering in animations
- Added
show_image
andsave_image
for embedding an image in the Notebook and saving an image to a file, respectively.
- Added
post_to_web
andfrom_web
methods for for communication with ipythonblocks.org. - Added a
display_time
keyword to theflash()
method. - Changed the
animate
property to a method so that it can take astop_time
keyword to control the amount of time between loop steps. - Fixed an error with improperly set attributes on views of grids.
- Fixed negative indexing in lower-left origin ImageGrids.
- Fixed an error that allowed too-large indices in lower-left origin ImageGrids.
- Allow color assignment from Blocks/Pixels, not just tuples. (Thanks @wolever.)
- Fixed an issue with an index of -1 in a 2D slice.
- Fixed a display issue with show_color on Firefox.
- Added a dictionary of HTML colors called
colors
- The lines between cells can be toggled on and off. Turning the lines off can sometimes improve the aesthetics of grids, especially at small block sizes.
- Added a
BlockGrid.to_text
method for easily sending grid data to a file. - Added a
show_color
function that just shows a stripe of a given color. - Added an
embed_colorpicker
function that embeds the website http://www.colorpicker.com/ in the Notebook.
- Added
BlockGrid.animate
attribute andBlockGrid.flash
method to facilitate animation of grid changes in the Notebook. - Added Pixel and ImageGrid subclasses that behave more like image manipulation libraries.
- Added cell titles so hover the mouse over a block displays the block index and color.
Block.row
andBlock.col
are now set by their containingBlockGrid
at the time theBlock
is returned to the user. This means that while iterating over a subgrid the firstBlock
will have coordinates (0, 0).- Getting a single row from a
BlockGrid
will return a newBlockGrid
- Raise a TypeError when indexing a
BlockGrid
with a length one tuple - Added a
Block.colors
property
- Convert assigned floating point numbers to integers for HTML compatibility
- Added the ability to change the size of individual blocks
- Python 3 support (thanks to Thomas Kluyver)
for block in grid
style iterationBlock
now has an HTML representation for displaying individual blocks__str__
methods onBlock
andBlockGrid
- Ability to control block size via
block_size
keyword and attribute onBlockGrid