fastplotlib.graphics._features.VertexColors#
- class VertexColors(colors, n_colors, alpha=None, isolated_buffer=True)[source]#
info dict +————+———————————————————–+———————————————————————————-+ | dict key | value type | value description | +============+===========================================================+==================================================================================+ | key | int | slice | np.ndarray[int | bool] | tuple[slice, …] | key at which colors were indexed/sliced | +————+———————————————————–+———————————————————————————-+ | value | np.ndarray | new color values for points that were changed, shape is [n_points_changed, RGBA] | +————+———————————————————–+———————————————————————————-+ | user_value | str | np.ndarray | tuple[float] | list[float] | list[str] | user input value that was parsed into the RGBA array | +————+———————————————————–+———————————————————————————-+
Manages the vertex color buffer for
LineGraphic
orScatterGraphic
- Parameters:
colors (str | np.ndarray | tuple[float, float, float, float] | list[str] | list[float] | int | float) – specify colors as a single human-readable string, RGBA array, or an iterable of strings or RGBA arrays
n_colors (int) – number of colors, if passing in a single str or single RGBA array
alpha (float, optional) – alpha value for the colors