From 2126df2dfd50a8cee88dc5916bc24b447fd85e7d Mon Sep 17 00:00:00 2001
From: Hysterelius <71912794+Hysterelius@users.noreply.github.com>
Date: Mon, 4 Nov 2024 22:16:26 +1100
Subject: [PATCH] Color: Expose OKHSL properties
---
core/variant/variant_setget.cpp | 4 ++++
doc/classes/Color.xml | 9 +++++++++
2 files changed, 13 insertions(+)
diff --git a/core/variant/variant_setget.cpp b/core/variant/variant_setget.cpp
index 05f7abf32c9..7f6994a204b 100644
--- a/core/variant/variant_setget.cpp
+++ b/core/variant/variant_setget.cpp
@@ -139,6 +139,10 @@ void register_named_setters_getters() {
REGISTER_MEMBER(Color, h);
REGISTER_MEMBER(Color, s);
REGISTER_MEMBER(Color, v);
+
+ REGISTER_MEMBER(Color, ok_hsl_h);
+ REGISTER_MEMBER(Color, ok_hsl_s);
+ REGISTER_MEMBER(Color, ok_hsl_l);
}
void unregister_named_setters_getters() {
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 86e421b5b82..57c4341bd48 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -493,6 +493,15 @@
The HSV hue of this color, on the range 0 to 1.
+
+ The OKHSL hue of this color, on the range 0 to 1.
+
+
+ The OKHSL lightness of this color, on the range 0 to 1.
+
+
+ The OKHSL saturation of this color, on the range 0 to 1.
+
The color's red component, typically on the range of 0 to 1.