@gen3/toolsff 0.11.17 → 0.11.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -179,37 +179,14 @@ const main = ()=>{
179
179
  flag: 'r'
180
180
  });
181
181
  const themeColors = JSON.parse(themeData);
182
- const primaryPallet = create10ColorPallet(themeColors.primary, shift, saturation);
183
- const secondaryPallet = create10ColorPallet(themeColors.secondary, shift, saturation);
184
- const accentPallet = create10ColorPallet(themeColors.accent, shift, saturation);
185
- const accentPalletWarm = create10ColorPallet(themeColors.accentWarm, shift, saturation);
186
- const accentPalletCool = create10ColorPallet(themeColors.accentCool, shift, saturation);
187
- const basePallet = create10ColorPallet(themeColors.base, shift, saturation);
188
- const chartPallet = create10ColorPallet(themeColors.chart, shift, saturation);
189
- const tablePallet = create10ColorPallet(themeColors?.table ?? '#ffffff', shift, saturation);
190
- const navigationPallet = create10ColorPallet(themeColors?.navigation ?? '#ffffff', shift, saturation);
191
- const theme = {
192
- primary: primaryPallet,
193
- 'primary-contrast': create10ColorAccessibleContrast(primaryPallet),
194
- secondary: secondaryPallet,
195
- 'secondary-contrast': create10ColorAccessibleContrast(secondaryPallet),
196
- accent: accentPallet,
197
- 'accent-contrast': create10ColorAccessibleContrast(accentPallet),
198
- 'accent-warm': accentPalletWarm,
199
- 'accent-warm-contrast': create10ColorAccessibleContrast(accentPalletWarm),
200
- 'accent-cool': accentPalletCool,
201
- 'accent-cool-contrast': create10ColorAccessibleContrast(accentPalletCool),
202
- base: basePallet,
203
- 'base-contrast': create10ColorAccessibleContrast(basePallet),
204
- utility: utility,
205
- 'utility-contrast': utilityContrast,
206
- chart: chartPallet,
207
- 'chart-contrast': create10ColorAccessibleContrast(chartPallet),
208
- table: tablePallet,
209
- 'table-contrast': create10ColorAccessibleContrast(tablePallet),
210
- navigation: navigationPallet,
211
- 'navigation-contrast': create10ColorAccessibleContrast(navigationPallet)
212
- };
182
+ // build a list of colors
183
+ const theme = Object.entries(themeColors).reduce((acc, [colorName, colorValue])=>{
184
+ acc[colorName] = create10ColorPallet(colorValue, shift, saturation);
185
+ acc[`${colorName}-contrast`] = create10ColorAccessibleContrast(acc[colorName]);
186
+ return acc;
187
+ }, {});
188
+ theme['utility'] = utility;
189
+ theme['utility-contrast'] = utilityContrast;
213
190
  writeFileSync(join(out ?? './', 'themeColors.json'), JSON.stringify(theme, null, 2));
214
191
  };
215
192
  main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gen3/toolsff",
3
- "version": "0.11.17",
3
+ "version": "0.11.18",
4
4
  "description": "tools for processing Gen3 commons content: color theme, icons, sharedFilters",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -48,5 +48,5 @@
48
48
  "axios": "^1.8.2"
49
49
  }
50
50
  },
51
- "gitHead": "5efafb9fc56f4acd01a59be4eae8c874e202532d"
51
+ "gitHead": "8140ce2d74954bd832549682ca66389518c2acba"
52
52
  }