mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
#154 trweaking some more, state diagram composit backgrounds
This commit is contained in:
parent
3a6915c0b6
commit
ffaf6c14e4
@ -114,7 +114,7 @@ g.stateGroup line {
|
|||||||
fill: ${options.background};
|
fill: ${options.background};
|
||||||
}
|
}
|
||||||
.statediagram-cluster.statediagram-cluster-alt .inner {
|
.statediagram-cluster.statediagram-cluster-alt .inner {
|
||||||
fill: '#e0e0e0';
|
fill: #e0e0e0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.statediagram-cluster .inner {
|
.statediagram-cluster .inner {
|
||||||
|
@ -82,7 +82,7 @@ g.stateGroup line {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.statediagram-cluster rect {
|
.statediagram-cluster rect {
|
||||||
fill: $nodeBkg;
|
// fill: $nodeBkg;
|
||||||
stroke: $nodeBorder;
|
stroke: $nodeBorder;
|
||||||
stroke-width: 1px;
|
stroke-width: 1px;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
import { invert, lighten, darken, rgba } from 'khroma';
|
import { invert, lighten, darken, rgba, adjust } from 'khroma';
|
||||||
|
|
||||||
class Theme {
|
class Theme {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.background = '#333';
|
this.background = '#333';
|
||||||
|
this.primaryColor = '#1f2020';
|
||||||
|
this.secondaryColor = lighten(this.primaryColor, 16);
|
||||||
this.mainBkg = '#1f2020';
|
this.mainBkg = '#1f2020';
|
||||||
this.secondBkg = 'calculated';
|
this.secondBkg = 'calculated';
|
||||||
this.mainContrastColor = 'lightgrey';
|
this.mainContrastColor = 'lightgrey';
|
||||||
@ -115,6 +117,15 @@ class Theme {
|
|||||||
/* state colors */
|
/* state colors */
|
||||||
this.labelColor = this.textColor;
|
this.labelColor = this.textColor;
|
||||||
this.altBackground = lighten(this.background, 20);
|
this.altBackground = lighten(this.background, 20);
|
||||||
|
|
||||||
|
this.fillType0 = this.primaryColor;
|
||||||
|
this.fillType1 = this.secondaryColor;
|
||||||
|
this.fillType2 = adjust(this.primaryColor, { h: 64 });
|
||||||
|
this.fillType3 = adjust(this.secondaryColor, { h: 64 });
|
||||||
|
this.fillType4 = adjust(this.primaryColor, { h: -64 });
|
||||||
|
this.fillType5 = adjust(this.secondaryColor, { h: -64 });
|
||||||
|
this.fillType6 = adjust(this.primaryColor, { h: 128 });
|
||||||
|
this.fillType7 = adjust(this.secondaryColor, { h: 128 });
|
||||||
/* class */
|
/* class */
|
||||||
this.classText = this.nodeBorder;
|
this.classText = this.nodeBorder;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
import { lighten, rgba } from 'khroma';
|
import { lighten, rgba, adjust } from 'khroma';
|
||||||
|
|
||||||
class Theme {
|
class Theme {
|
||||||
constructor() {
|
constructor() {
|
||||||
/* Base variables */
|
/* Base variables */
|
||||||
|
this.primaryColor = '#ECECFF';
|
||||||
|
this.secondaryColor = '#ffffde';
|
||||||
this.background = 'white';
|
this.background = 'white';
|
||||||
this.mainBkg = '#ECECFF';
|
this.mainBkg = '#ECECFF';
|
||||||
this.secondBkg = '#ffffde';
|
this.secondBkg = '#ffffde';
|
||||||
@ -123,6 +125,15 @@ class Theme {
|
|||||||
/* state colors */
|
/* state colors */
|
||||||
/* class */
|
/* class */
|
||||||
this.classText = this.nodeBorder;
|
this.classText = this.nodeBorder;
|
||||||
|
/* journey */
|
||||||
|
this.fillType0 = this.primaryColor;
|
||||||
|
this.fillType1 = this.secondaryColor;
|
||||||
|
this.fillType2 = adjust(this.primaryColor, { h: 64 });
|
||||||
|
this.fillType3 = adjust(this.secondaryColor, { h: 64 });
|
||||||
|
this.fillType4 = adjust(this.primaryColor, { h: -64 });
|
||||||
|
this.fillType5 = adjust(this.secondaryColor, { h: -64 });
|
||||||
|
this.fillType6 = adjust(this.primaryColor, { h: 128 });
|
||||||
|
this.fillType7 = adjust(this.secondaryColor, { h: 128 });
|
||||||
}
|
}
|
||||||
calculate(overrides) {
|
calculate(overrides) {
|
||||||
if (typeof overrides !== 'object') {
|
if (typeof overrides !== 'object') {
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
import { darken } from 'khroma';
|
import { darken, adjust } from 'khroma';
|
||||||
class Theme {
|
class Theme {
|
||||||
constructor() {
|
constructor() {
|
||||||
/* Base vales */
|
/* Base vales */
|
||||||
|
this.primaryColor = '#cde498';
|
||||||
|
this.secondaryColor = '#cdffb2';
|
||||||
this.background = 'white';
|
this.background = 'white';
|
||||||
this.mainBkg = '#cde498';
|
this.mainBkg = '#cde498';
|
||||||
this.secondBkg = '#cdffb2';
|
this.secondBkg = '#cdffb2';
|
||||||
@ -98,6 +100,15 @@ class Theme {
|
|||||||
/* state colors */
|
/* state colors */
|
||||||
/* class */
|
/* class */
|
||||||
this.classText = this.nodeBorder;
|
this.classText = this.nodeBorder;
|
||||||
|
/* journey */
|
||||||
|
this.fillType0 = this.primaryColor;
|
||||||
|
this.fillType1 = this.secondaryColor;
|
||||||
|
this.fillType2 = adjust(this.primaryColor, { h: 64 });
|
||||||
|
this.fillType3 = adjust(this.secondaryColor, { h: 64 });
|
||||||
|
this.fillType4 = adjust(this.primaryColor, { h: -64 });
|
||||||
|
this.fillType5 = adjust(this.secondaryColor, { h: -64 });
|
||||||
|
this.fillType6 = adjust(this.primaryColor, { h: 128 });
|
||||||
|
this.fillType7 = adjust(this.secondaryColor, { h: 128 });
|
||||||
}
|
}
|
||||||
calculate(overrides) {
|
calculate(overrides) {
|
||||||
if (typeof overrides !== 'object') {
|
if (typeof overrides !== 'object') {
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
import { darken, lighten } from 'khroma';
|
import { darken, lighten, adjust } from 'khroma';
|
||||||
|
|
||||||
// const Color = require ( 'khroma/dist/color' ).default
|
// const Color = require ( 'khroma/dist/color' ).default
|
||||||
// Color.format.hex.stringify(Color.parse('hsl(210, 66.6666666667%, 95%)')); // => "#EAF2FB"
|
// Color.format.hex.stringify(Color.parse('hsl(210, 66.6666666667%, 95%)')); // => "#EAF2FB"
|
||||||
|
|
||||||
class Theme {
|
class Theme {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
this.primaryColor = '#eee';
|
||||||
|
this.contrast = '#26a';
|
||||||
|
this.secondaryColor = lighten(this.contrast, 55);
|
||||||
this.background = 'white';
|
this.background = 'white';
|
||||||
this.mainBkg = '#eee';
|
this.mainBkg = '#eee';
|
||||||
this.contrast = '#26a';
|
|
||||||
this.secondBkg = 'calculated';
|
this.secondBkg = 'calculated';
|
||||||
this.lineColor = '#666';
|
this.lineColor = '#666';
|
||||||
this.border1 = '#999';
|
this.border1 = '#999';
|
||||||
@ -130,6 +132,15 @@ class Theme {
|
|||||||
/* state colors */
|
/* state colors */
|
||||||
/* class */
|
/* class */
|
||||||
this.classText = this.nodeBorder;
|
this.classText = this.nodeBorder;
|
||||||
|
/* journey */
|
||||||
|
this.fillType0 = this.primaryColor;
|
||||||
|
this.fillType1 = this.secondaryColor;
|
||||||
|
this.fillType2 = adjust(this.primaryColor, { h: 64 });
|
||||||
|
this.fillType3 = adjust(this.secondaryColor, { h: 64 });
|
||||||
|
this.fillType4 = adjust(this.primaryColor, { h: -64 });
|
||||||
|
this.fillType5 = adjust(this.secondaryColor, { h: -64 });
|
||||||
|
this.fillType6 = adjust(this.primaryColor, { h: 128 });
|
||||||
|
this.fillType7 = adjust(this.secondaryColor, { h: 128 });
|
||||||
}
|
}
|
||||||
calculate(overrides) {
|
calculate(overrides) {
|
||||||
if (typeof overrides !== 'object') {
|
if (typeof overrides !== 'object') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user