diff --git a/app/configurator/config-types.ts b/app/configurator/config-types.ts index e464a2af7..b819fe474 100644 --- a/app/configurator/config-types.ts +++ b/app/configurator/config-types.ts @@ -319,9 +319,12 @@ export type PieConfig = t.TypeOf; const DivergingPaletteType = t.union([ t.literal("BrBG"), - t.literal("PRGn"), t.literal("PiYG"), + t.literal("PRGn"), t.literal("PuOr"), + t.literal("RdBu"), + t.literal("RdYlBu"), + t.literal("RdYlGn"), ]); export type DivergingPaletteType = t.TypeOf; diff --git a/app/palettes.ts b/app/palettes.ts index 6963b4705..8459222cd 100644 --- a/app/palettes.ts +++ b/app/palettes.ts @@ -165,7 +165,7 @@ type SteppedPalette = Omit, "interpolator"> & { colors: ReadonlyArray; }; const steppedPaletteSteps = [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]; -const divergingPaletteKeys = [ +const divergingPaletteKeys: DivergingPaletteType[] = [ "RdBu", "RdYlBu", "RdYlGn", @@ -173,15 +173,15 @@ const divergingPaletteKeys = [ "PRGn", "PiYG", "PuOr", -] as DivergingPaletteType[]; -const sequentialPaletteKeys = [ +]; +const sequentialPaletteKeys: SequentialPaletteType[] = [ "blues", "greens", "greys", "oranges", "purples", "reds", -] as SequentialPaletteType[]; +]; const interpolatorByName = { RdBu: interpolateRdBu, RdYlBu: interpolateRdYlBu,