RGBtoHSV

From GECK
Jump to: navigation, search


A function added by the JohnnyGuitar NVSE Plugin version 4.20.

Description

Takes numeric values of Red, Green and Blue channels (from 0 to 255) and returns Hue (from 0 to 360 degrees), Saturation and Value (percentage from 0 to 1). Uses script variables as inputs and outputs.

Syntax

[help]
RGBtoHSV rIn:scriptVar gIn:scriptVar bIn:scriptVar hOut:scriptVar sOut:scriptVar vOut:scriptVar

Example

int rIn = 120
int gIn = 255
int bIn = 13
float hOut
float sOut
float vOut
RGBtoHSV rIn gIn bIn hOut sOut vOut

See Also