이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 9. Customizing Red Hat Developer Hub appearance
The following default theme configurations are available for Red Hat Developer Hub:
- The Red Hat Developer Hub theme
- Default theme configurations to make your developer portal look like a standard Red Hat Developer Hub instance. For more information, see Section 9.9, “Default Red Hat Developer Hub theme”
- The Backstage theme
- Default theme configurations to make your developer portal look like a standard Backstage instance. For more information, see Section 9.10, “Default Backstage theme”
You can change or disable particular parameters in a default theme or create a fully customized theme by modifying the app-config-rhdh.yaml
file. From the app-config-rhdh.yaml
file, you can customize common theme components, including the following:
- Company name and logo
- Font color, size, and style of text in paragraphs, headings, headers, and buttons
- Header color, gradient, and shape
- Button color
- Navigation indicator color
You can also customize some components from the Developer Hub GUI, such as the theme mode (Light Theme, Dark Theme, or Auto).
9.1. Customizing the theme mode for your Developer Hub instance
In Developer Hub, theme configurations are used to change the look and feel of different UI components. So, you might notice changes in different UI components, such as buttons, tabs, sidebars, cards, and tables along with some changes in background color and font used on the RHDH pages.
You can choose one of the following theme modes for your Developer Hub instance:
- Light theme
- Dark theme
- Auto
The default theme mode is Auto, which automatically sets the light or dark theme based on your system preferences.
Prerequisites
- You are logged in to the Developer Hub web console.
Procedure
- From the Developer Hub web console, click Settings.
From the Appearance panel, click LIGHT THEME, DARK THEME, or AUTO to change the theme mode.
9.2. Customizing the branding logo of your Developer Hub instance
You can customize the branding logo of your Developer Hub instance by configuring the branding
section in the app-config.yaml
file, as shown in the following example:
app: branding: fullLogo: ${BASE64_EMBEDDED_FULL_LOGO} iconLogo: ${BASE64_EMBEDDED_ICON_LOGO}
app:
branding:
fullLogo: ${BASE64_EMBEDDED_FULL_LOGO}
iconLogo: ${BASE64_EMBEDDED_ICON_LOGO}
where:
- 1
fullLogo
is the logo on the expanded (pinned) sidebar and expects a base64 encoded image.- 2
iconLogo
is the logo on the collapsed (unpinned) sidebar and expects a base64 encoded image.You can format the
BASE64_EMBEDDED_FULL_LOGO
environment variable as follows:BASE64_EMBEDDED_FULL_LOGO: "data:_<media_type>_;base64,<base64_data>"
BASE64_EMBEDDED_FULL_LOGO: "data:_<media_type>_;base64,<base64_data>"
Copy to Clipboard Copied! The following example demonstrates how to customize the
BASE64_EMBEDDED_FULL_LOGO
using thedata:_<media_type>_;base64,<base64_data>
format:SVGLOGOBASE64=$(base64 -i logo.svg) BASE64_EMBEDDED_FULL_LOGO="data:image/svg+xml;base64,$SVGLOGOBASE64"
SVGLOGOBASE64=$(base64 -i logo.svg) BASE64_EMBEDDED_FULL_LOGO="data:image/svg+xml;base64,$SVGLOGOBASE64"
Copy to Clipboard Copied! Replace
image/svg+xml
with the correct media type for your image (for example,image/png
andimage/jpeg
), and adjust the file extension accordingly. As a result, you can embed the logo directly without referencing an external file.
You can also customize the width of the branding logo by setting a value for the fullLogoWidth
field in the branding
section, as shown in the following example:
app: branding: fullLogoWidth: 110px # ...
app:
branding:
fullLogoWidth: 110px
# ...
- 1
- The default value for the logo width is
110px
. The following units are supported:integer
,px
,em
,rem
, percentage.
9.4. Configuring entity tab titles
Red Hat Developer Hub provides a default opinionated tab set for catalog entity views. For consistency with your organization needs, you can rename, reorder, remove, and add tab titles.
Procedure
For each tab to modify, enter your desired values in the
entityTabs
section in yourapp-config.yaml
file:upstream: backstage: appConfig: dynamicPlugins: frontend: <plugin_name>: entityTabs: - mountPoint: <mount_point> path: <path> title: <title> priority: <priority>
upstream: backstage: appConfig: dynamicPlugins: frontend: <plugin_name>: entityTabs: - mountPoint: <mount_point> path: <path> title: <title> priority: <priority>
Copy to Clipboard Copied! <plugin_name>
-
Enter the plugin name, such as
backstage-community.plugin-topology
. mountPoint
-
Enter the tab mountpoint, such as
entity.page.topology
. path
-
Enter the tab path, such as
/topology
. title
-
Enter the tab title, such as
Topology
. priority
Optional.
To reorder tabs, enter the tab priority, such as
42
. Higher priority appears first.To remove a tab, enter a negative value, such as
-1
.
9.5. Configuring entity detail tab layout
Each Red Hat Developer Hub entity detail tab has a default opinionated layout. For consistency with your organization needs, you can change the entity detail tab content when the plugin that contributes the tab content allows a configuration.
Prerequisites
-
The plugin that contributes the tab content allows a configuration, such as Developer Hub plugins defining a default configuration in a
config
section.
Procedure
Copy the plugin default configuration in your
app-config.yaml
file, and change thelayout
properties.global: dynamic: plugins: - package: <package_location> disabled: false pluginConfig: dynamicPlugins: frontend: <plugin_name>: mountPoints: - mountPoint: <mount_point> importName: <import_name> config: layout: gridColumn: lg: span 6 xs: span 12
global: dynamic: plugins: - package: <package_location> disabled: false pluginConfig: dynamicPlugins: frontend: <plugin_name>: mountPoints: - mountPoint: <mount_point> importName: <import_name> config: layout: gridColumn: lg: span 6 xs: span 12
Copy to Clipboard Copied! package
-
Enter your package location, such as
./dynamic-plugins/dist/backstage-community-plugin-tekton
. <plugin_name>
-
Enter your plugin name, such as:
backstage-community.plugin-tekton
. mountPoint
-
Copy the mount point defined in the plugin default configuration, such as:
entity.page.ci/cards
. importName
-
Copy the import name defined in the plugin default configuration, such as:
TektonCI
. layout
-
Enter your layout configuration. The tab content is displayed in a responsive grid that uses a 12 column-grid and supports different breakpoints (
xs
,sm
,md
,lg
,xl
) that can be specified for a CSS property, such asgridColumn
. The example uses 6 of the 12 columns to show two Tekton CI cards side-by-side on large (lg
) screens (span 6
columns) and show them among themselves (xs
and abovespan 12
columns).
9.6. Customizing the theme mode color palettes for your Developer Hub instance
You can customize the color palettes of the light and dark theme modes in your Developer Hub instance by configuring the light.palette
and dark.palette
parameters in the branding.theme
section of the app-config.yaml
file, as shown in the following example:
app: branding: theme: light: palette: primary: main: <light_primary_color> navigation: indicator: <light_indicator_color> pageTheme: default: backgroundColor: [<light_background_color_1>, <light_background_color_2>] dark: palette: primary: main: <dark_primary_color> navigation: indicator: <dark_indicator_color> pageTheme: default: backgroundColor: [<dark_background_color_1>, <dark_background_color_2>] # ...
app:
branding:
theme:
light:
palette:
primary:
main: <light_primary_color>
navigation:
indicator: <light_indicator_color>
pageTheme:
default:
backgroundColor: [<light_background_color_1>, <light_background_color_2>]
dark:
palette:
primary:
main: <dark_primary_color>
navigation:
indicator: <dark_indicator_color>
pageTheme:
default:
backgroundColor: [<dark_background_color_1>, <dark_background_color_2>]
# ...
- 1
- The main primary color for the light color palette, for example,
#ffffff
orwhite
- 2
- The color of the navigation indicator for the light color palette, which is a vertical bar that indicates the selected tab in the navigation panel, for example,
#FF0000
orred
- 3
- The background color for the default page theme for the light color palette, for example,
#ffffff
orwhite
- 4
- The main primary color for the dark color palette, for example,
#000000
orblack
- 5
- The color of the navigation indicator for the dark color palette, which is a vertical bar that indicates the selected tab in the navigation panel, for example,
#FF0000
orred
- 6
- The background color for the default page theme for the dark color palette, for example,
#000000
orblack
Additional resources
9.7. Customizing the page theme header for your Developer Hub instance
You can customize the header color for the light and dark theme modes in your Developer Hub instance by modifying the branding.theme
section of the app-config.yaml
file. You can also customize the page headers for additional Developer Hub pages, such as the Home, Catalog, and APIs pages.
app: branding: theme: light: palette: {} pageTheme: default: backgroundColor: "<default_light_background_color>" fontColor: "<default_light_font_color>" shape: none apis: backgroundColor: "<apis_light_background_color>" fontColor: "<apis_light_font_color>" shape: none dark: palette: {} pageTheme: default: backgroundColor: "<default_dark_background_color>" fontColor: "<default_dark_font_color>" shape: none # ...
app:
branding:
theme:
light:
palette: {}
pageTheme:
default:
backgroundColor: "<default_light_background_color>"
fontColor: "<default_light_font_color>"
shape: none
apis:
backgroundColor: "<apis_light_background_color>"
fontColor: "<apis_light_font_color>"
shape: none
dark:
palette: {}
pageTheme:
default:
backgroundColor: "<default_dark_background_color>"
fontColor: "<default_dark_font_color>"
shape: none
# ...
- 1
- The theme mode, for example,
light
ordark
- 2
- The
yaml
header for the default page theme configuration - 3
- The color of the page header background, for example,
#ffffff
orwhite
- 4
- The color of the text in the page header, for example,
#000000
orblack
- 5
- The pattern on the page header, for example,
wave
,round
, ornone
- 6
- The
yaml
header for a specific page theme configuration, for example,apis
,home
9.8. Customizing the font for your Developer Hub instance
You can configure the typography
section of the app-config.yaml
file to change the default font family and size of the page text, as well as the font family and size of each heading level, as shown in the following example:
app: branding: theme: light: typography: fontFamily: "Times New Roman" htmlFontSize: 11 # smaller is bigger h1: fontFamily: "Times New Roman" fontSize: 40 h2: fontFamily: "Times New Roman" fontSize: 30 h3: fontFamily: "Times New Roman" fontSize: 30 h4: fontFamily: "Times New Roman" fontSize: 30 h5: fontFamily: "Times New Roman" fontSize: 30 h6: fontFamily: "Times New Roman" fontSize: 30 dark: typography: fontFamily: "Times New Roman" htmlFontSize: 11 # smaller is bigger h1: fontFamily: "Times New Roman" fontSize: 40 h2: fontFamily: "Times New Roman" fontSize: 30 h3: fontFamily: "Times New Roman" fontSize: 30 h4: fontFamily: "Times New Roman" fontSize: 30 h5: fontFamily: "Times New Roman" fontSize: 30 h6: fontFamily: "Times New Roman" fontSize: 30 # ...
app:
branding:
theme:
light:
typography:
fontFamily: "Times New Roman"
htmlFontSize: 11 # smaller is bigger
h1:
fontFamily: "Times New Roman"
fontSize: 40
h2:
fontFamily: "Times New Roman"
fontSize: 30
h3:
fontFamily: "Times New Roman"
fontSize: 30
h4:
fontFamily: "Times New Roman"
fontSize: 30
h5:
fontFamily: "Times New Roman"
fontSize: 30
h6:
fontFamily: "Times New Roman"
fontSize: 30
dark:
typography:
fontFamily: "Times New Roman"
htmlFontSize: 11 # smaller is bigger
h1:
fontFamily: "Times New Roman"
fontSize: 40
h2:
fontFamily: "Times New Roman"
fontSize: 30
h3:
fontFamily: "Times New Roman"
fontSize: 30
h4:
fontFamily: "Times New Roman"
fontSize: 30
h5:
fontFamily: "Times New Roman"
fontSize: 30
h6:
fontFamily: "Times New Roman"
fontSize: 30
# ...
9.9. Default Red Hat Developer Hub theme
You can use the default Red Hat Developer Hub theme configurations to make your Developer Hub instance look like a standard Red Hat Developer Hub instance. You can also modify the app-config.yaml
file to customize or disable particular parameters.
9.9.1. Default Red Hat Developer Hub theme color palette
The app-config.yaml
file uses the following configurations for the default Red Hat Developer Hub color palette:
app: branding: theme: light: variant: "rhdh" 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" mode: "light" navigation: background: "#222427" indicator: "#0066CC" color: "#ffffff" selectedColor: "#ffffff" navItem: hoverBackground: "#3c3f42" submenu: background: "#222427" pinSidebarButton: background: "#BDBDBD" icon: "#181818" primary: main: "#0066CC" secondary: main: "#8476D1" 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" text: primary: "#151515" secondary: "#757575" rhdh: general: disabledBackground: "#D2D2D2" disabled: "#6A6E73" searchBarBorderColor: "#E4E4E4" formControlBackgroundColor: "#FFF" mainSectionBackgroundColor: "#FFF" headerBottomBorderColor: "#C7C7C7" cardBackgroundColor: "#FFF" sidebarBackgroundColor: "#212427" cardBorderColor: "#C7C7C7" tableTitleColor: "#181818" tableSubtitleColor: "#616161" tableColumnTitleColor: "#151515" tableRowHover: "#F5F5F5" tableBorderColor: "#E0E0E0" tableBackgroundColor: "#FFF" tabsBottomBorderColor: "#D2D2D2" contrastText: "#FFF" primary: main: "#0066CC" focusVisibleBorder: "#0066CC" secondary: main: "#8476D1" focusVisibleBorder: "#8476D1" cards: headerTextColor: "#151515" headerBackgroundColor: "#FFF" headerBackgroundImage: "none" dark: variant: "rhdh" 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: "#0f1214" indicator: "#0066CC" color: "#ffffff" selectedColor: "#ffffff" navItem: hoverBackground: "#3c3f42" submenu: background: "#0f1214" pinSidebarButton: background: "#BDBDBD" icon: "#404040" primary: main: "#1FA7F8" secondary: main: "#B2A3FF" 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" rhdh: general: disabledBackground: "#444548" disabled: "#AAABAC" searchBarBorderColor: "#57585a" formControlBackgroundColor: "#36373A" mainSectionBackgroundColor: "#0f1214" headerBottomBorderColor: "#A3A3A3" cardBackgroundColor: "#292929" sidebarBackgroundColor: "#1b1d21" cardBorderColor: "#A3A3A3" tableTitleColor: "#E0E0E0" tableSubtitleColor: "#E0E0E0" tableColumnTitleColor: "#E0E0E0" tableRowHover: "#0f1214" tableBorderColor: "#515151" tableBackgroundColor: "#1b1d21" tabsBottomBorderColor: "#444548" contrastText: "#FFF" primary: main: "#1FA7F8" focusVisibleBorder: "#ADD6FF" secondary: main: "#B2A3FF" focusVisibleBorder: "#D0C7FF" cards: headerTextColor: "#FFF" headerBackgroundColor: "#0f1214" headerBackgroundImage: "none"
app:
branding:
theme:
light:
variant: "rhdh"
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"
mode: "light"
navigation:
background: "#222427"
indicator: "#0066CC"
color: "#ffffff"
selectedColor: "#ffffff"
navItem:
hoverBackground: "#3c3f42"
submenu:
background: "#222427"
pinSidebarButton:
background: "#BDBDBD"
icon: "#181818"
primary:
main: "#0066CC"
secondary:
main: "#8476D1"
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"
text:
primary: "#151515"
secondary: "#757575"
rhdh:
general:
disabledBackground: "#D2D2D2"
disabled: "#6A6E73"
searchBarBorderColor: "#E4E4E4"
formControlBackgroundColor: "#FFF"
mainSectionBackgroundColor: "#FFF"
headerBottomBorderColor: "#C7C7C7"
cardBackgroundColor: "#FFF"
sidebarBackgroundColor: "#212427"
cardBorderColor: "#C7C7C7"
tableTitleColor: "#181818"
tableSubtitleColor: "#616161"
tableColumnTitleColor: "#151515"
tableRowHover: "#F5F5F5"
tableBorderColor: "#E0E0E0"
tableBackgroundColor: "#FFF"
tabsBottomBorderColor: "#D2D2D2"
contrastText: "#FFF"
primary:
main: "#0066CC"
focusVisibleBorder: "#0066CC"
secondary:
main: "#8476D1"
focusVisibleBorder: "#8476D1"
cards:
headerTextColor: "#151515"
headerBackgroundColor: "#FFF"
headerBackgroundImage: "none"
dark:
variant: "rhdh"
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: "#0f1214"
indicator: "#0066CC"
color: "#ffffff"
selectedColor: "#ffffff"
navItem:
hoverBackground: "#3c3f42"
submenu:
background: "#0f1214"
pinSidebarButton:
background: "#BDBDBD"
icon: "#404040"
primary:
main: "#1FA7F8"
secondary:
main: "#B2A3FF"
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"
rhdh:
general:
disabledBackground: "#444548"
disabled: "#AAABAC"
searchBarBorderColor: "#57585a"
formControlBackgroundColor: "#36373A"
mainSectionBackgroundColor: "#0f1214"
headerBottomBorderColor: "#A3A3A3"
cardBackgroundColor: "#292929"
sidebarBackgroundColor: "#1b1d21"
cardBorderColor: "#A3A3A3"
tableTitleColor: "#E0E0E0"
tableSubtitleColor: "#E0E0E0"
tableColumnTitleColor: "#E0E0E0"
tableRowHover: "#0f1214"
tableBorderColor: "#515151"
tableBackgroundColor: "#1b1d21"
tabsBottomBorderColor: "#444548"
contrastText: "#FFF"
primary:
main: "#1FA7F8"
focusVisibleBorder: "#ADD6FF"
secondary:
main: "#B2A3FF"
focusVisibleBorder: "#D0C7FF"
cards:
headerTextColor: "#FFF"
headerBackgroundColor: "#0f1214"
headerBackgroundImage: "none"
Alternatively, you can use the following variant
and mode
values in the app-config.yaml
file to apply the previous default configuration:
app: branding: theme: light: variant: "rhdh" mode: "light" dark: variant: "rhdh" mode: "dark"
app:
branding:
theme:
light:
variant: "rhdh"
mode: "light"
dark:
variant: "rhdh"
mode: "dark"
9.9.2. Default Red Hat Developer Hub page themes
The default Developer Hub header color is white in light mode and black in dark mode, as shown in the following app-config.yaml
file configuration:
app: branding: theme: light: palette: {} defaultPageTheme: default pageTheme: default: backgroundColor: "#ffffff" dark: palette: {} defaultPageTheme: default pageTheme: default: backgroundColor: "#0f1214"
app:
branding:
theme:
light:
palette: {}
defaultPageTheme: default
pageTheme:
default:
backgroundColor: "#ffffff"
dark:
palette: {}
defaultPageTheme: default
pageTheme:
default:
backgroundColor: "#0f1214"
9.10. Default Backstage theme
You can use the default Backstage theme configurations to make your Developer Hub instance look like a standard Backstage instance. You can also modify the app-config.yaml
file to customize or disable particular parameters.
9.10.1. Default Backstage theme color palette
The app-config.yaml
file uses the following configurations for the default 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"
Alternatively, you can use the following variant
and mode
values in the app-config.yaml
file to apply the previous default configuration:
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. Default Backstage page themes
The default Backstage header color is white in light mode and black in dark mode, as shown in the following app-config.yaml
file configuration:
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
9.11. Loading a custom Developer Hub theme by using a dynamic plugin
You can load a custom Developer Hub theme from a dynamic plugin.
Procedure
Export a theme provider function in your dynamic plugin, for example:
Sample
myTheme.ts
fragmentimport { lightTheme } from './lightTheme'; // some custom theme import { UnifiedThemeProvider } from '@backstage/theme'; export const lightThemeProvider = ({ children }: { children: ReactNode }) => ( <UnifiedThemeProvider theme={lightTheme} children={children} /> );
import { lightTheme } from './lightTheme'; // some custom theme import { UnifiedThemeProvider } from '@backstage/theme'; export const lightThemeProvider = ({ children }: { children: ReactNode }) => ( <UnifiedThemeProvider theme={lightTheme} children={children} /> );
Copy to Clipboard Copied! For more information about creating a custom theme, see Backstage documentation - Creating a Custom Theme.
Configure Developer Hub to load the theme in the UI by using the
themes
configuration field:app-config.yaml
fragmentdynamicPlugins: frontend: example.my-custom-theme-plugin: themes: - id: light title: Light variant: light icon: someIconReference importName: lightThemeProvider
dynamicPlugins: frontend: example.my-custom-theme-plugin: themes: - id: light
1 title: Light variant: light icon: someIconReference importName: lightThemeProvider
Copy to Clipboard Copied! - 1
- Set your theme ID by specifying the desired value. Optionally, override the default Developer Hub themes by using the following ID values:
light
to replace the default light theme, ordark
to replace the default dark theme.
Verification
- The theme is available in the Developer Hub Settings page.
9.12. Custom component options for your Developer Hub instance
There are two component variants that you can use to customize various components of your Developer Hub theme:
- Patternfly
- MUI
In addition to assigning a component variant to each parameter in the light or dark theme mode configurations, you can toggle the rippleEffect
on
or off
.
The following code shows the options that you can use in the app-config.yaml
file to configure the theme components for your Developer Hub instance:
app: branding: theme: light: options: rippleEffect: off / on paper: patternfly / mui buttons: patternfly / mui inputs: patternfly / mui accordions: patternfly / mui sidebars: patternfly / mui pages: patternfly / mui headers: patternfly / mui toolbars: patternfly / mui dialogs: patternfly / mui cards: patternfly / mui tables: patternfly / mui tabs: patternfly / mui dark: options: rippleEffect: off / on paper: patternfly / mui buttons: patternfly / mui inputs: patternfly / mui accordions: patternfly / mui sidebars: patternfly / mui pages: patternfly / mui headers: patternfly / mui toolbars: patternfly / mui dialogs: patternfly / mui cards: patternfly / mui tables: patternfly / mui tabs: patternfly / mui
app:
branding:
theme:
light:
options:
rippleEffect: off / on
paper: patternfly / mui
buttons: patternfly / mui
inputs: patternfly / mui
accordions: patternfly / mui
sidebars: patternfly / mui
pages: patternfly / mui
headers: patternfly / mui
toolbars: patternfly / mui
dialogs: patternfly / mui
cards: patternfly / mui
tables: patternfly / mui
tabs: patternfly / mui
dark:
options:
rippleEffect: off / on
paper: patternfly / mui
buttons: patternfly / mui
inputs: patternfly / mui
accordions: patternfly / mui
sidebars: patternfly / mui
pages: patternfly / mui
headers: patternfly / mui
toolbars: patternfly / mui
dialogs: patternfly / mui
cards: patternfly / mui
tables: patternfly / mui
tabs: patternfly / mui