9.10. 默认阶段主题
您可以使用默认的 Backstage 主题配置使 Developer Hub 实例类似于标准 Backstage 实例。您还可以修改 app-config.yaml
文件以自定义或禁用特定参数。
9.10.1. 默认回阶段主题颜色面板 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
app-config.yaml
文件对默认的 Backstage color palette 使用以下配置:
app: branding: theme: light: variant: "backstage" mode: "light" palette: background: default: "#F8F8F8" paper: "#FFFFFF" banner: closeButtonColor: "#FFFFFF" error: "#E22134" info: "#2E77D0" link: "#000000" text: "#FFFFFF" warning: "#FF9800" border: "#E6E6E6" bursts: backgroundColor: default: "#7C3699" fontColor: "#FEFEFE" gradient: linear: "linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)" slackChannelText: "#ddd" errorBackground: "#FFEBEE" errorText: "#CA001B" gold: "#FFD600" highlight: "#FFFBCC" infoBackground: "#ebf5ff" infoText: "#004e8a" link: "#0A6EBE" linkHover: "#2196F3" navigation: background: "#171717" color: "#b5b5b5" indicator: "#9BF0E1" navItem: hoverBackground: "#404040" selectedColor: "#FFF" submenu: background: "#404040" pinSidebarButton: background: "#BDBDBD" icon: "#181818" primary: main: "#1F5493" status: aborted: "#757575" error: "#E22134" ok: "#1DB954" pending: "#FFED51" running: "#1F5493" warning: "#FF9800" tabbar: indicator: "#9BF0E1" textContrast: "#000000" textSubtle: "#6E6E6E" textVerySubtle: "#DDD" warningBackground: "#F59B23" warningText: "#000000" dark: variant: "backstage" mode: "dark" palette: background: default: "#333333" paper: "#424242" banner: closeButtonColor: "#FFFFFF" error: "#E22134" info: "#2E77D0" link: "#000000" text: "#FFFFFF" warning: "#FF9800" border: "#E6E6E6" bursts: backgroundColor: default: "#7C3699" fontColor: "#FEFEFE" gradient: linear: "linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)" slackChannelText: "#ddd" errorBackground: "#FFEBEE" errorText: "#CA001B" gold: "#FFD600" highlight: "#FFFBCC" infoBackground: "#ebf5ff" infoText: "#004e8a" link: "#9CC9FF" linkHover: "#82BAFD" mode: "dark" navigation: background: "#424242" color: "#b5b5b5" indicator: "#9BF0E1" navItem: hoverBackground: "#404040" selectedColor: "#FFF" submenu: background: "#404040" pinSidebarButton: background: "#BDBDBD" icon: "#404040" primary: dark: "#82BAFD" main: "#9CC9FF" secondary: main: "#FF88B2" status: aborted: "#9E9E9E" error: "#F84C55" ok: "#71CF88" pending: "#FEF071" running: "#3488E3" warning: "#FFB84D" tabbar: indicator: "#9BF0E1" textContrast: "#FFFFFF" textSubtle: "#CCCCCC" textVerySubtle: "#727272" warningBackground: "#F59B23" warningText: "#000000"
app:
branding:
theme:
light:
variant: "backstage"
mode: "light"
palette:
background:
default: "#F8F8F8"
paper: "#FFFFFF"
banner:
closeButtonColor: "#FFFFFF"
error: "#E22134"
info: "#2E77D0"
link: "#000000"
text: "#FFFFFF"
warning: "#FF9800"
border: "#E6E6E6"
bursts:
backgroundColor:
default: "#7C3699"
fontColor: "#FEFEFE"
gradient:
linear: "linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"
slackChannelText: "#ddd"
errorBackground: "#FFEBEE"
errorText: "#CA001B"
gold: "#FFD600"
highlight: "#FFFBCC"
infoBackground: "#ebf5ff"
infoText: "#004e8a"
link: "#0A6EBE"
linkHover: "#2196F3"
navigation:
background: "#171717"
color: "#b5b5b5"
indicator: "#9BF0E1"
navItem:
hoverBackground: "#404040"
selectedColor: "#FFF"
submenu:
background: "#404040"
pinSidebarButton:
background: "#BDBDBD"
icon: "#181818"
primary:
main: "#1F5493"
status:
aborted: "#757575"
error: "#E22134"
ok: "#1DB954"
pending: "#FFED51"
running: "#1F5493"
warning: "#FF9800"
tabbar:
indicator: "#9BF0E1"
textContrast: "#000000"
textSubtle: "#6E6E6E"
textVerySubtle: "#DDD"
warningBackground: "#F59B23"
warningText: "#000000"
dark:
variant: "backstage"
mode: "dark"
palette:
background:
default: "#333333"
paper: "#424242"
banner:
closeButtonColor: "#FFFFFF"
error: "#E22134"
info: "#2E77D0"
link: "#000000"
text: "#FFFFFF"
warning: "#FF9800"
border: "#E6E6E6"
bursts:
backgroundColor:
default: "#7C3699"
fontColor: "#FEFEFE"
gradient:
linear: "linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"
slackChannelText: "#ddd"
errorBackground: "#FFEBEE"
errorText: "#CA001B"
gold: "#FFD600"
highlight: "#FFFBCC"
infoBackground: "#ebf5ff"
infoText: "#004e8a"
link: "#9CC9FF"
linkHover: "#82BAFD"
mode: "dark"
navigation:
background: "#424242"
color: "#b5b5b5"
indicator: "#9BF0E1"
navItem:
hoverBackground: "#404040"
selectedColor: "#FFF"
submenu:
background: "#404040"
pinSidebarButton:
background: "#BDBDBD"
icon: "#404040"
primary:
dark: "#82BAFD"
main: "#9CC9FF"
secondary:
main: "#FF88B2"
status:
aborted: "#9E9E9E"
error: "#F84C55"
ok: "#71CF88"
pending: "#FEF071"
running: "#3488E3"
warning: "#FFB84D"
tabbar:
indicator: "#9BF0E1"
textContrast: "#FFFFFF"
textSubtle: "#CCCCCC"
textVerySubtle: "#727272"
warningBackground: "#F59B23"
warningText: "#000000"
另外,您可以使用 app-config.yaml
文件中的以下 变体
和模式
值来应用以前的默认配置:
app: branding: theme: light: variant: "backstage" mode: "light" dark: variant: "backstage" mode: "dark"
app:
branding:
theme:
light:
variant: "backstage"
mode: "light"
dark:
variant: "backstage"
mode: "dark"
9.10.2. 默认 Backstage 页主题 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
默认 Backstage 标头颜色在 light mode 和 black in dark 模式中是白色的,如以下 app-config.yaml
文件配置中所示:
app: branding: theme: light: palette: {} defaultPageTheme: default pageTheme: default: backgroundColor: ['#005B4B'] # teal fontColor: '#ffffff' shape: wave documentation: backgroundColor: ['#C8077A', '#C2297D'] # pinkSea fontColor: '#ffffff' shape: wave2 tool: backgroundColor: ['#8912CA', '#3E00EA'] # purpleSky fontColor: '#ffffff' shape: round service: backgroundColor: ['#006D8F', '#0049A1'] # marineBlue fontColor: '#ffffff' shape: wave website: backgroundColor: ['#0027AF', '#270094'] # veryBlue fontColor: '#ffffff' shape: wave library: backgroundColor: ['#98002B', '#8D1134'] # rubyRed fontColor: '#ffffff' shape: wave other: backgroundColor: ['#171717', '#383838'] # darkGrey fontColor: '#ffffff' shape: wave app: backgroundColor: ['#BE2200', '#A41D00'] # toastyOrange fontColor: '#ffffff' shape: shapes.wave apis: backgroundColor: ['#005B4B'] # teal fontColor: '#ffffff' shape: wave2 card: backgroundColor: ['#4BB8A5', '#187656'] # greens fontColor: '#ffffff' shape: wave dark: palette: {} defaultPageTheme: default pageTheme: default: backgroundColor: ['#005B4B'] # teal fontColor: '#ffffff' shape: wave documentation: backgroundColor: ['#C8077A', '#C2297D'] # pinkSea fontColor: '#ffffff' shape: wave2 tool: backgroundColor: ['#8912CA', '#3E00EA'] # purpleSky fontColor: '#ffffff' shape: round service: backgroundColor: ['#006D8F', '#0049A1'] # marineBlue fontColor: '#ffffff' shape: wave website: backgroundColor: ['#0027AF', '#270094'] # veryBlue fontColor: '#ffffff' shape: wave library: backgroundColor: ['#98002B', '#8D1134'] # rubyRed fontColor: '#ffffff' shape: wave other: backgroundColor: ['#171717', '#383838'] # darkGrey fontColor: '#ffffff' shape: wave app: backgroundColor: ['#BE2200', '#A41D00'] # toastyOrange fontColor: '#ffffff' shape: shapes.wave apis: backgroundColor: ['#005B4B'] # teal fontColor: '#ffffff' shape: wave2 card: backgroundColor: ['#4BB8A5', '#187656'] # greens fontColor: '#ffffff' shape: wave
app:
branding:
theme:
light:
palette: {}
defaultPageTheme: default
pageTheme:
default:
backgroundColor: ['#005B4B'] # teal
fontColor: '#ffffff'
shape: wave
documentation:
backgroundColor: ['#C8077A', '#C2297D'] # pinkSea
fontColor: '#ffffff'
shape: wave2
tool:
backgroundColor: ['#8912CA', '#3E00EA'] # purpleSky
fontColor: '#ffffff'
shape: round
service:
backgroundColor: ['#006D8F', '#0049A1'] # marineBlue
fontColor: '#ffffff'
shape: wave
website:
backgroundColor: ['#0027AF', '#270094'] # veryBlue
fontColor: '#ffffff'
shape: wave
library:
backgroundColor: ['#98002B', '#8D1134'] # rubyRed
fontColor: '#ffffff'
shape: wave
other:
backgroundColor: ['#171717', '#383838'] # darkGrey
fontColor: '#ffffff'
shape: wave
app:
backgroundColor: ['#BE2200', '#A41D00'] # toastyOrange
fontColor: '#ffffff'
shape: shapes.wave
apis:
backgroundColor: ['#005B4B'] # teal
fontColor: '#ffffff'
shape: wave2
card:
backgroundColor: ['#4BB8A5', '#187656'] # greens
fontColor: '#ffffff'
shape: wave
dark:
palette: {}
defaultPageTheme: default
pageTheme:
default:
backgroundColor: ['#005B4B'] # teal
fontColor: '#ffffff'
shape: wave
documentation:
backgroundColor: ['#C8077A', '#C2297D'] # pinkSea
fontColor: '#ffffff'
shape: wave2
tool:
backgroundColor: ['#8912CA', '#3E00EA'] # purpleSky
fontColor: '#ffffff'
shape: round
service:
backgroundColor: ['#006D8F', '#0049A1'] # marineBlue
fontColor: '#ffffff'
shape: wave
website:
backgroundColor: ['#0027AF', '#270094'] # veryBlue
fontColor: '#ffffff'
shape: wave
library:
backgroundColor: ['#98002B', '#8D1134'] # rubyRed
fontColor: '#ffffff'
shape: wave
other:
backgroundColor: ['#171717', '#383838'] # darkGrey
fontColor: '#ffffff'
shape: wave
app:
backgroundColor: ['#BE2200', '#A41D00'] # toastyOrange
fontColor: '#ffffff'
shape: shapes.wave
apis:
backgroundColor: ['#005B4B'] # teal
fontColor: '#ffffff'
shape: wave2
card:
backgroundColor: ['#4BB8A5', '#187656'] # greens
fontColor: '#ffffff'
shape: wave