Change color on the navigation bar?

Hi,
I have tha latest PowerShell Universal installed on my server and I can’t for the life of me find how I can change the color on the navigation bar that are default in the dashboards.

Product: PowerShell Universal
Version: 1.4.6

You can change the navigation bar header using themes. Set the palette’s main color to do so.

https://docs.powershelluniversal.com/dashboard/themes#changing-the-background-color

We don’t have a way to hide the theme switch at the moment. I’ll open an issue for that.

Hi,
I’m wondering what’s the code snip to change the color when you have the mouse pointer over it?
I have change the color of the buttom but now when I have the mouse over it it’s just grey and I want to change that color.

$Theme = @{

palette = @{

    primary = @{

        main = 'rgba(80, 184, 72, 0.3)'

    }

    grey = @{

        '300' = 'rgba(0, 151, 207, 0.6)'

    }

    action = @{

        hover = 'rgba(80, 184, 72, 0.3)'

    }

}

}

So far this seems to get ignored or causes errors for me. Here is what I have:

$Theme = @{
palette = @{
primary = @{
main = ‘#5a881c
}
background = @{
default = ‘#fafafa
}
}
}
$Navigation = @(
New-UDListItem -Label “Group Membership” -OnClick { Invoke-UDRedirect ‘/Groups’ }

New-UDListItem -Label “Group Membership” -OnClick { Invoke-UDRedirect ‘/usermanage’ }

New-UDListItem -Label "Object Search" -OnClick { Invoke-UDRedirect '/Object-Search' }

)

New-UDDashboard -Title “List Manager” -Pages @(
. “$PSScriptRoot\pages\group-membership.ps1”
. “$PSScriptRoot\pages\object-search.ps1”
. “$PSScriptRoot\pages\object-info.ps1”

. “$PSScriptRoot\pages\usermanage.ps1”

)

I tried placing the theme at the top, middle and end of this code and it is ignored. The banner color never changes from blue. Am I doing something wrong?

You need to make sure to pass the $Theme variable to New-UDDashboard.

$Theme = @{
palette = @{
primary = @{
main = ‘#5a881c’
}
background = @{
default = ‘#fafafa’
}
}
}
New-UDDashboard -Title “List Manager” -Theme $Theme -Content {
    "Cool"
}

image

1 Like

This did resolve my issue thank you.