Palette

org.appliedtopology.tda4j.plot.Palette
See thePalette companion object
final case class Palette(seriesLight: IndexedSeq[String], seriesDark: IndexedSeq[String], light: Chrome, dark: Chrome, sequential: IndexedSeq[String], divergingNegative: String, divergingPositive: String, divergingMidpoint: String) extends Tweak

Everything a plot's colors come from: categorical slots (light and dark steps of the same hues), chrome for each mode, a sequential ramp (light = small) and a diverging pair. Palette.brand (the default) is TDA4j's Teal & Gold; Palette.reference is the neutral palette of the dataviz method. Make your own with withSeries, withSurface and copy.

A palette is a Tweak: fig + Palette.reference recolors every part of the figure, heatmaps and cocycles included.

Attributes

Companion
object
Experimental
true
Source
Color.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Tweak
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def css(paint: Paint): String

The CSS variable a paint resolves through under Theme.Auto, or its hex for a fixed color.

The CSS variable a paint resolves through under Theme.Auto, or its hex for a fixed color.

Attributes

Source
Color.scala
def cssVariables(selector: String): String

The CSS custom properties of both modes, scoped to selector.

The CSS custom properties of both modes, scoped to selector.

Attributes

Source
Color.scala
def divergingAt(t: Double): String

t in [-1, 1]: divergingNegative below zero, the neutral midpoint at zero, divergingPositive above.

t in [-1, 1]: divergingNegative below zero, the neutral midpoint at zero, divergingPositive above.

Attributes

Source
Color.scala
def hex(paint: Paint, theme: Theme): String

The color of a paint that needs only the palette. A Paint.Value needs the figure's ColorScale as well, so it is colored by ColorScale.hex and has no color here.

The color of a paint that needs only the palette. A Paint.Value needs the figure's ColorScale as well, so it is colored by ColorScale.hex and has no color here.

Attributes

Source
Color.scala

figure with this change.

figure with this change.

Attributes

Source
Color.scala
override def onScene(s: Scene): Scene

scene with this change: only tweaks of the labels, the size and the look apply to a 3-D scene.

scene with this change: only tweaks of the labels, the size and the look apply to a 3-D scene.

Attributes

Definition Classes
Source
Color.scala
def sequentialAt(t: Double): String

t in [0, 1] on the sequential ramp.

t in [0, 1] on the sequential ramp.

Attributes

Source
Color.scala
def withDegrees(styles: Map[Int, DegreeStyle]): Palette

This palette with each degree's own color where a DegreeStyle gives one.

This palette with each degree's own color where a DegreeStyle gives one.

Attributes

Source
Color.scala
def withSeries(colors: Seq[String], dark: Seq[String] = ...): Palette

This palette with the categorical slots colors (light mode) and dark (dark mode, default: the same colors). Slot k colors homological degree k, so list them in degree order.

This palette with the categorical slots colors (light mode) and dark (dark mode, default: the same colors). Slot k colors homological degree k, so list them in degree order.

Attributes

Source
Color.scala
def withSurface(light: String, dark: String = ...): Palette

This palette on other surfaces (the figure's background): light in light mode, dark (default: unchanged) in dark mode. withSurface("#ffffff") for a figure that goes onto a white page.

This palette on other surfaces (the figure's background): light in light mode, dark (default: unchanged) in dark mode. withSurface("#ffffff") for a figure that goes onto a white page.

Attributes

Source
Color.scala

Inherited methods

def +(that: Tweak): Tweak

This change, then that one.

This change, then that one.

Attributes

Inherited from:
Tweak
Source
Tweak.scala
def onBoard(board: Board): Board

board with this change in every figure of it.

board with this change in every figure of it.

Attributes

Inherited from:
Tweak
Source
Tweak.scala

page with this change in every panel of it; a tweak a 3-D panel cannot have leaves that panel as it is.

page with this change in every panel of it; a tweak a 3-D panel cannot have leaves that panel as it is.

Attributes

Inherited from:
Tweak
Source
Tweak.scala
def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala