How to change the color of window caption in golang gio ui
09:30 26 Aug 2026

I'm looking at golang library https://gioui.org/

When I run a hello world example:

package main

import (
    "image/color"
    "log"
    "os"

    "gioui.org/app"
    "gioui.org/op"
    "gioui.org/text"
    "gioui.org/widget/material"
)

func main() {
    go func() {
        window := new(app.Window)
        err := run(window)
        if err != nil {
            log.Fatal(err)
        }
        os.Exit(0)
    }()
    app.Main()
}


func run(window *app.Window) error {
    theme := material.NewTheme()
    var ops op.Ops
    for {
        switch e := window.Event().(type) {
        case app.DestroyEvent:
            return e.Err
        case app.FrameEvent:
            // This graphics context is used for managing the rendering state.
            gtx := app.NewContext(&ops, e)

            // Define an large label with an appropriate text:
            title := material.H1(theme, "Hello, Gio")

            // Change the color of the label.
            maroon := color.NRGBA{R: 127, G: 0, B: 0, A: 255}
            title.Color = maroon

            // Change the position of the label.
            title.Alignment = text.Middle

            // Draw the label to the graphics context.
            title.Layout(gtx)

            // Pass the drawing operations to the GPU.
            e.Frame(gtx.Ops)
        }
    }
}

the window caption is blue, looking very different from the rest of the windows on my system (Ubuntu).

gui window

How do I change this color? I cannot find it in API, documentation, internet.

go user-interface