ValueColoredTextbox

ValueColoredTextbox#

class penzai.treescope.arrayviz.arrayviz.ValueColoredTextbox[source]#

Bases: RendersAsRootInIPython, DeferringToChild

A rendering of text with a colored background.

Variables:
  • child (part_interface.RenderableTreePart) – Child part to render.

  • text_color (str) – Color for the text.

  • background_color (str) – Color for the background, usually from a colormap.

  • out_of_bounds (bool) – Whether this value was out of bounds of the colormap.

  • value (float) – Underlying float value that is being visualized. Rendered on hover.

Inherited Attributes

collapsed_width

The length of this rendering if collapsed in one line, in characters.

newlines_in_expanded_parent

The number of newlines in this rendering if in an expanded parent.

tags_in_this_part

Returns a set of "tag" objects contained in this part.

Methods

__init__(child, text_color, ...)

html_setup_parts(setup_context)

render_to_html(stream, *[, at_beginning_of_line])

Attributes

collapsed_width

The length of this rendering if collapsed in one line, in characters.

newlines_in_expanded_parent

The number of newlines in this rendering if in an expanded parent.

tags_in_this_part

Returns a set of "tag" objects contained in this part.

child

text_color

background_color

out_of_bounds

value

Inherited Methods

(expand to view inherited methods)

foldables_in_this_part()

render_to_text(stream, *, expanded_parent, ...)