summaryrefslogtreecommitdiffstats
path: root/core/variant_call.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-02-19 21:51:04 +0100
committerGitHub <noreply@github.com>2018-02-19 21:51:04 +0100
commit745524486613d24fb1287877af91e00471df7650 (patch)
tree0bf56b16b38fddee3bcfc9ad32c8ae8d1a850486 /core/variant_call.cpp
parenta5688ccd90573b1700e06417b94c0c46ce5a2e9a (diff)
parentbe5517123101fe669ebfc3d3f16a0431ca2804dd (diff)
downloadredot-engine-745524486613d24fb1287877af91e00471df7650.tar.gz
Merge pull request #15852 from poke1024/color_hsv
Add Color.from_hsv()
Diffstat (limited to 'core/variant_call.cpp')
-rw-r--r--core/variant_call.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index 5607751a27..2764ca3975 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -443,6 +443,7 @@ struct _VariantCall {
VCALL_LOCALMEM1R(Color, lightened);
VCALL_LOCALMEM1R(Color, darkened);
VCALL_LOCALMEM1R(Color, to_html);
+ VCALL_LOCALMEM4R(Color, from_hsv);
VCALL_LOCALMEM0R(RID, get_id);
@@ -1589,6 +1590,7 @@ void register_variant_methods() {
ADDFUNC1R(COLOR, COLOR, Color, lightened, REAL, "amount", varray());
ADDFUNC1R(COLOR, COLOR, Color, darkened, REAL, "amount", varray());
ADDFUNC1R(COLOR, STRING, Color, to_html, BOOL, "with_alpha", varray(true));
+ ADDFUNC4R(COLOR, COLOR, Color, from_hsv, REAL, "h", REAL, "s", REAL, "v", REAL, "a", varray(1.0));
ADDFUNC0R(_RID, INT, RID, get_id, varray());