def METHOD_NAME(page, port):
    header_color = 'rgb(0, 0, 128)'
    active_header_background = 'rgb(0, 128, 0)'
    header_background = 'rgb(128, 0, 0)'
    card = Card(
        header_color=header_color,
        active_header_background=active_header_background,
        header_background=header_background,
    )
    serve_panel_widget(page, port, card)
    card_header = page.locator('.card-header')
    assert f'color: {header_color};' in card_header.get_attribute('style')
    # card is expanded by default
    assert f'background-color: {active_header_background};' in card_header.get_attribute('style')
    # collapse the card, header background color is set to header_background
    card_header.wait_for()
    card_header.click()
    assert f'background-color: {header_background};' in card_header.get_attribute('style')