From 4834ac0453aa8de6293d68df213be77a22010e68 Mon Sep 17 00:00:00 2001 From: Kronos9247 Date: Tue, 29 Aug 2017 14:19:00 +0200 Subject: [PATCH] Adding hsv to rgb --- lua/starfall/libs_sh/color.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/starfall/libs_sh/color.lua b/lua/starfall/libs_sh/color.lua index 745586b6..8262c924 100644 --- a/lua/starfall/libs_sh/color.lua +++ b/lua/starfall/libs_sh/color.lua @@ -71,3 +71,10 @@ end function color_methods:toHSV () return ColorToHSV( unwrap( self ) ) end + +--- Converts the color from RGB to HSV. +--@shared +--@return A triplet of numbers representing RGB. +function color_methods:hsv2rgb () + return HSVToColor( unwrap( self ) ) +end