#3561 Adding cScale0-11 etc and usage of the colors from the mindmap diagram

This commit is contained in:
Knut Sveidqvist
2022-10-03 14:51:13 +02:00
parent 05a594a492
commit 8ee321fd7b
11 changed files with 300 additions and 64 deletions

View File

@@ -1,3 +1,29 @@
const getStyles = () => ``;
import { darken, lighten, isDark } from 'khroma';
const genSections = (options) => {
let sections = '';
for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
sections += `
.section-${i} rect {
fill: ${options['cScale' + i]};
stroke: ${options['cScalePeer' + i]};
stroke-width: 4;
}
.section-${i} rect.inverted {
fill: ${options['cScaleInv' + i]};
}
.section-${i} text {
fill: ${options['cScaleLabel' + i]};
}
`;
}
return sections;
};
const getStyles = (options) =>
`
${genSections(options)}
`;
export default getStyles;