GetSystemColor

From GECK
Jump to: navigation, search


A function added by the JohnnyGuitar NVSE Plugin version 4.20.

Description

Returns the global RGB color of the specified interface.

1	HUD - Main
2	HUD - Alt.
3	Terminal
4	Pip-Boy
5	Main/Pause Menu

Syntax

[help]
(hex) GetSystemColor interfaceID:int{1-5}

Example

int iColor = GetSystemColor 1 

Retrieving individual RGB values

The function returns a combined RGB value. To separate it into three channels, bitwise operations can be used, as follows:

int iRgb
int iRed
int iGreen
int iBlue

set iRgb to GetSystemColor 1

set iRed to RightShift iRgb 16
set iRed to LogicalAnd iRed 255

set iGreen to RightShift iRgb 8
set iGreen to LogicalAnd iGreen 255

set iBlue to LogicalAnd iRgb 255

printc "%g %g %g" iRed iGreen iBlue

See Also