ScaleColorGrey

Grey ramp color palette for discrete categories.

Defaults

helper
scaleColorGrey
family
color-fill
aesthetic
color
scale type
ordinal
options type
GreyScaleOptions

Also exported as

  • ScaleColourGrey

Svelte component

import { GGPlot, GeomPoint, ScaleColorGrey } from "@ggsvelte/svelte";

<GGPlot data={rows} aes={{ x: "x", y: "y", color: "group" }}>
  <ScaleColorGrey />
  <GeomPoint />
</GGPlot>

JSON scales

{
  "scales": {
    "color": {
      "type": "ordinal"
    }
  }
}

Params

domain

Array<DomainValue>

Explicit semantic domain. Manual/ordinal scales use ordered values; sequential/binned scales use [min, max].

domainMode

"grow" | "data"

Ordinal domain stability: "grow" (default) preserves assignments across filters; "data" rebuilds from current data.

reverse

boolean

Reverse the output color range. Default false.

naValue

string

Color for null/missing values. Default9.

unknownValue

string

Color for invalid, out-of-domain, or unmapped values. Default9.

onExhaust

"cycle" | "error"

Ordinal palette exhaustion policy: "cycle" (default) with a warning, or "error".

guide

GuideSpec

Guide presentation override (legend, colorbar, colorsteps, or none).

start

number

Grey start (0–1).

end

number

Grey end (0–1).

Guide interaction

Legend guide for discrete/manual/identity color. Set guide: "none" to hide.

Examples

← All scales · Palettes · Scales and guides