Skip to content

Changing on write-host the background color, foreground color is ignored  #25062

@fceledon

Description

@fceledon

Prerequisites

Steps to reproduce

Write-Host -NoNewline -BackgroundColor "green" -ForegroundColor 'Yellow' -Object ${Message}

The foreground is not yellow!

Expected behavior

a yellow foreground color

Actual behavior

a black foreground color

Error details

there is no error at all

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.6
PSEdition                      Core
GitCommitId                    7.4.6
OS                             Microsoft Windows 10.0.20348
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions