summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-06-07 20:52:32 +0200
committerGitHub <noreply@github.com>2022-06-07 20:52:32 +0200
commitd52a79ad2288f815f935f40a089b5fe0887188a6 (patch)
tree6ce9c2bd823999d92b5e51f91b787a4e170da2d4 /doc/classes
parent28cf97746f7fbf3e2bf6bb96c1b48a72f2d738d2 (diff)
parent1b776a6e7a5046d337933f8504699d1c4244289e (diff)
Merge pull request #59786 from V-Sekai/ok_color
Allow picking similar colours using OKHSL.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/Color.xml18
-rw-r--r--doc/classes/ColorPicker.xml3
2 files changed, 21 insertions, 0 deletions
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 7b8a57ed22..d5a62d2d75 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -165,6 +165,24 @@
[/codeblocks]
</description>
</method>
+ <method name="from_ok_hsl" qualifiers="static">
+ <return type="Color" />
+ <argument index="0" name="h" type="float" />
+ <argument index="1" name="s" type="float" />
+ <argument index="2" name="l" type="float" />
+ <argument index="3" name="alpha" type="float" default="1.0" />
+ <description>
+ Constructs a color from an [url=https://bottosson.github.io/posts/colorpicker/]OK HSL profile[/url]. [code]h[/code] (hue), [code]s[/code] (saturation), and [code]v[/code] (value) are typically between 0 and 1.
+ [codeblocks]
+ [gdscript]
+ var c = Color.from_ok_hsl(0.58, 0.5, 0.79, 0.8)
+ [/gdscript]
+ [csharp]
+ var c = Color.FromOkHsl(0.58f, 0.5f, 0.79f, 0.8f);
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
<method name="from_rgbe9995" qualifiers="static">
<return type="Color" />
<argument index="0" name="rgbe" type="int" />
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index 5c47d6fb54..7c9c4ed4d6 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -91,6 +91,9 @@
<constant name="SHAPE_VHS_CIRCLE" value="2" enum="PickerShapeType">
HSV Color Model circle color space. Use Saturation as a radius.
</constant>
+ <constant name="SHAPE_OKHSL_CIRCLE" value="3" enum="PickerShapeType">
+ HSL OK Color Model circle color space.
+ </constant>
</constants>
<theme_items>
<theme_item name="h_width" data_type="constant" type="int" default="30">