Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color: Expose OKHSL properties #82845

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions core/variant/variant_setget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
9 changes: 9 additions & 0 deletions doc/classes/Color.xml
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,15 @@
<member name="h" type="float" setter="" getter="" default="0.0">
The HSV hue of this color, on the range 0 to 1.
</member>
<member name="ok_hsl_h" type="float" setter="" getter="" default="0.0">
The OKHSL hue of this color, on the range 0 to 1.
</member>
<member name="ok_hsl_l" type="float" setter="" getter="" default="0.0">
The OKHSL lightness of this color, on the range 0 to 1.
</member>
<member name="ok_hsl_s" type="float" setter="" getter="" default="0.0">
The OKHSL saturation of this color, on the range 0 to 1.
</member>
<member name="r" type="float" setter="" getter="" default="0.0">
The color's red component, typically on the range of 0 to 1.
</member>
Expand Down