RsgPalette

Sets the color palette used by a StandardDialog and its child elements

import { RsgPalette } from "@roku-sdk/components";

Also exported as RSGPalette from @roku-sdk/components (deprecated).

Deprecated: RSGPalette. Renamed to RsgPalette. Use RsgPalette instead — RSGPalette will be removed in a future release.

RsgPalette(props: IStandardDialogRSGPaletteNodeProps): JSX.Element

Description

Sets the color palette used by a StandardDialog and its child elements.

The RSGPalette node defines 10 color values that control the appearance of dialog backgrounds, text, buttons, focus indicators, keyboards, and other elements. By default, dialogs inherit their palette from ancestor nodes in the scene graph (typically from the Scene node).

Parameters

NameTypeDescription
propsIStandardDialogRSGPaletteNodeProps

Example

<StandardDialog>
    <rsgPalette colors={{
        dialogBackgroundColor: "0x1E1E1EFF",
        dialogTextColor: "0xFFFFFFFF",
        dialogFocusColor: "0x0066FFFF",
    }} />
    <stdDlgTitleArea primaryTitle="Settings" />
    <stdDlgContentArea>
        <stdDlgTextItem text="Choose an option below." />
    </stdDlgContentArea>
</StandardDialog>

Types

IStandardDialogRSGPaletteNodeProps

NameTypeDescription
colorsPaletteColorsColor palette values for the dialog.

Did this page help you?