To enable the gradient topbar, add data-topbar-color="gradient" to the <html> tag in your layout. You can apply this dynamically using the LayoutStoreService with setTopbarColor('gradient').