Palette

org.appliedtopology.tda4j.plot.Palette
See thePalette companion class
object Palette

Attributes

Companion
class
Experimental
true
Source
Color.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Palette.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def along(stops: IndexedSeq[String], t: Double): String

The color at t in [0, 1] along evenly spaced stops.

The color at t in [0, 1] along evenly spaced stops.

Attributes

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

An angle as a fraction of a turn, t (taken mod 1), on a cyclic map: equal lightness and chroma all the way round (OKLCH), so no angle looks more important than another and 0 meets 1 without a seam. The same in every palette: a cyclic quantity needs a cyclic map, which no brand ramp is.

An angle as a fraction of a turn, t (taken mod 1), on a cyclic map: equal lightness and chroma all the way round (OKLCH), so no angle looks more important than another and 0 meets 1 without a seam. The same in every palette: a cyclic quantity needs a cyclic map, which no brand ramp is.

Attributes

Source
Color.scala
def mix(h1: String, h2: String, t: Double): String

The color a fraction t of the way from h1 to h2, in OKLab.

The color a fraction t of the way from h1 to h2, in OKLab.

Attributes

Source
Color.scala
def named(name: String): Palette

The palette called name, in any case: brand (the default), reference, print, grayscale, okabe-ito or clear.

The palette called name, in any case: brand (the default), reference, print, grayscale, okabe-ito or clear.

Attributes

Source
Color.scala

Concrete fields

val brand: Palette

TDA4j's Teal & Gold (brand/DECISIONS.md), stepped for charts: the docs site's cream and blue-black surfaces, teal ink, and categorical slots that open with the brand's teal and gold (degree 0 teal, degree 1 gold, degree 2 brick, the site's error hue) at the lightness and chroma charts need. Checked with the dataviz palette validator: the first three slots pass every check on ALL pairs in both modes (a persistence diagram puts any two degrees side by side; worst color-vision-deficiency ΔE 8.5 light, 9.2 dark), all eight on adjacent pairs. The sequential ramp is teal (light for small values), the diverging pair teal against gold, a blue-yellow axis every color vision sees.

TDA4j's Teal & Gold (brand/DECISIONS.md), stepped for charts: the docs site's cream and blue-black surfaces, teal ink, and categorical slots that open with the brand's teal and gold (degree 0 teal, degree 1 gold, degree 2 brick, the site's error hue) at the lightness and chroma charts need. Checked with the dataviz palette validator: the first three slots pass every check on ALL pairs in both modes (a persistence diagram puts any two degrees side by side; worst color-vision-deficiency ΔE 8.5 light, 9.2 dark), all eight on adjacent pairs. The sequential ramp is teal (light for small values), the diverging pair teal against gold, a blue-yellow axis every color vision sees.

Attributes

Source
Color.scala
val clear: Palette

For a figure with no background of its own (Style.clear) that goes onto a page of either color: pure black elements for a light page (Theme.Light) and pure white ones for a dark page (Theme.Dark, or Theme.Auto, which follows the reader's setting, so use it only where the page does too). The degree colors are print's on a light page and the brand's dark steps on a dark one, each validated on its own surface (pure white, pure black: the first three on all pairs, all eight on adjacent pairs); the heatmap ramps are print's.

For a figure with no background of its own (Style.clear) that goes onto a page of either color: pure black elements for a light page (Theme.Light) and pure white ones for a dark page (Theme.Dark, or Theme.Auto, which follows the reader's setting, so use it only where the page does too). The degree colors are print's on a light page and the brand's dark steps on a dark one, each validated on its own surface (pure white, pure black: the first three on all pairs, all eight on adjacent pairs); the heatmap ramps are print's.

It is print with a dark mode of its own; with no Style.clear, a figure shown on a page has the white or the black background of its mode (a saved .svg has none either way, unless its style asks for one).

Attributes

Source
Color.scala

The palette figures use unless given another.

The palette figures use unless given another.

Attributes

Source
Color.scala

For a paper that prints in black and white, or a reader who sees no color: every color is a gray on print's white surface and black ink. Degrees are told apart by lightness (a dark, a light and a middle gray first, each at least 3:1 against the white so that a mark shows) and, as in every palette, by the marker shape and the legend: past four degrees the grays repeat in spirit, so rely on the shapes. The sequential ramp is ColorBrewer's Greys (darker for larger). A diverging scale is a dark gray for the negative end against a middle gray for the positive one around a light middle: the sign shows by how dark the end is, which is a weaker cue than a hue, so use print for a cocycle's values when color is available.

For a paper that prints in black and white, or a reader who sees no color: every color is a gray on print's white surface and black ink. Degrees are told apart by lightness (a dark, a light and a middle gray first, each at least 3:1 against the white so that a mark shows) and, as in every palette, by the marker shape and the legend: past four degrees the grays repeat in spirit, so rely on the shapes. The sequential ramp is ColorBrewer's Greys (darker for larger). A diverging scale is a dark gray for the negative end against a middle gray for the positive one around a light middle: the sign shows by how dark the end is, which is a weaker cue than a hue, so use print for a cocycle's values when color is available.

A gray palette has no chroma, so the dataviz validator's chroma floor, which asks for colorful series, fails it by construction; its lightness steps are what is checked. Like print it has one look for both modes.

Attributes

Source
Color.scala

The eight colors of Okabe and Ito's color-blind-safe palette, on print's white surface and black ink: blue, vermillion and bluish green for degrees 0 to 2, then orange, sky blue, reddish purple, yellow and black. The first three pass every check of the dataviz validator on ALL pairs, which a persistence diagram needs; orange and sky blue are lighter than the 3:1 a mark wants against white, and yellow and black fall outside the validator's lightness band (black has no chroma), so they come last and the marker shape and the legend carry the degrees past the third. Okabe and Ito defined their colors for a light background, so there is one look for both modes, as for print, whose scales it shares: a ColorBrewer Blues ramp, and blue against vermillion for a diverging scale. It is validated as accessible on white only: on another background the checks no longer hold.

The eight colors of Okabe and Ito's color-blind-safe palette, on print's white surface and black ink: blue, vermillion and bluish green for degrees 0 to 2, then orange, sky blue, reddish purple, yellow and black. The first three pass every check of the dataviz validator on ALL pairs, which a persistence diagram needs; orange and sky blue are lighter than the 3:1 a mark wants against white, and yellow and black fall outside the validator's lightness band (black has no chroma), so they come last and the marker shape and the legend carry the degrees past the third. Okabe and Ito defined their colors for a light background, so there is one look for both modes, as for print, whose scales it shares: a ColorBrewer Blues ramp, and blue against vermillion for a diverging scale. It is validated as accessible on white only: on another background the checks no longer hold.

Attributes

Source
Color.scala

The reference palette of the dataviz method: blue, orange, aqua, yellow, magenta, green, violet, red on near-white and near-black, a blue ramp, blue against red.

The reference palette of the dataviz method: blue, orange, aqua, yellow, magenta, green, violet, red on near-white and near-black, a blue ramp, blue against red.

Attributes

Source
Color.scala