1- import { VictoryThemeDefinition } from "./types" ;
1+ import { VictoryThemeDefinition , VictoryThemePalette } from "./types" ;
22
33// *
44// * Colors
@@ -9,7 +9,7 @@ const lime300 = "#DCE775";
99const lightGreen500 = "#8BC34A" ;
1010const teal700 = "#00796B" ;
1111const cyan900 = "#006064" ;
12- const colors = [
12+ const colorScale = [
1313 deepOrange600 ,
1414 yellow200 ,
1515 lime300 ,
@@ -21,6 +21,39 @@ const blueGrey50 = "#ECEFF1";
2121const blueGrey300 = "#90A4AE" ;
2222const blueGrey700 = "#455A64" ;
2323const grey900 = "#212121" ;
24+
25+ const colors : VictoryThemePalette = {
26+ blue : "#4F7DA1" ,
27+ pink : "#E2A37F" ,
28+ teal : teal700 ,
29+ purple : "#DF948A" ,
30+ green : lightGreen500 ,
31+ orange : deepOrange600 ,
32+ cyan : cyan900 ,
33+ red : "#DF5A49" ,
34+ yellow : yellow200 ,
35+ } ;
36+
37+ const grayscale = [ blueGrey50 , blueGrey300 , blueGrey700 , grey900 ] ;
38+ const qualitative = [
39+ "#334D5C" ,
40+ "#45B29D" ,
41+ "#EFC94C" ,
42+ "#E27A3F" ,
43+ "#DF5A49" ,
44+ "#4F7DA1" ,
45+ "#55DBC1" ,
46+ "#EFDA97" ,
47+ "#E2A37F" ,
48+ "#DF948A" ,
49+ ] ;
50+ const heatmap = [ "#428517" , "#77D200" , "#D6D305" , "#EC8E19" , "#C92B05" ] ;
51+ const warm = [ "#940031" , "#C43343" , "#DC5429" , "#FF821D" , "#FFAF55" ] ;
52+ const cool = [ "#2746B9" , "#0B69D4" , "#2794DB" , "#31BB76" , "#60E83B" ] ;
53+ const red = [ "#FCAE91" , "#FB6A4A" , "#DE2D26" , "#A50F15" , "#750B0E" ] ;
54+ const green = [ "#354722" , "#466631" , "#649146" , "#8AB25C" , "#A9C97E" ] ;
55+ const blue = [ "#002C61" , "#004B8F" , "#006BC9" , "#3795E5" , "#65B4F4" ] ;
56+
2457// *
2558// * Typography
2659// *
@@ -61,6 +94,17 @@ const strokeLinecap = "round";
6194const strokeLinejoin = "round" ;
6295
6396export const material : VictoryThemeDefinition = {
97+ palette : {
98+ colors,
99+ grayscale,
100+ qualitative,
101+ heatmap,
102+ warm,
103+ cool,
104+ red,
105+ green,
106+ blue,
107+ } ,
64108 area : Object . assign (
65109 {
66110 style : {
@@ -182,7 +226,7 @@ export const material: VictoryThemeDefinition = {
182226 ) ,
183227 group : Object . assign (
184228 {
185- colorScale : colors ,
229+ colorScale,
186230 } ,
187231 baseProps ,
188232 ) ,
@@ -200,7 +244,7 @@ export const material: VictoryThemeDefinition = {
200244 baseProps ,
201245 ) ,
202246 legend : {
203- colorScale : colors ,
247+ colorScale,
204248 gutter : 10 ,
205249 orientation : "vertical" ,
206250 titleOrientation : "top" ,
@@ -228,7 +272,7 @@ export const material: VictoryThemeDefinition = {
228272 ) ,
229273 pie : Object . assign (
230274 {
231- colorScale : colors ,
275+ colorScale,
232276 style : {
233277 data : {
234278 padding,
@@ -256,7 +300,7 @@ export const material: VictoryThemeDefinition = {
256300 ) ,
257301 stack : Object . assign (
258302 {
259- colorScale : colors ,
303+ colorScale,
260304 } ,
261305 baseProps ,
262306 ) ,
0 commit comments