summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorK. S. Ernest (iFire) Lee <fire@users.noreply.github.com>2022-04-18 11:29:29 -0700
committerK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2022-06-07 05:53:27 -0700
commit1b776a6e7a5046d337933f8504699d1c4244289e (patch)
tree24697438d1b8671201b82cadca722b1a7d8c07b1 /doc
parent36bd26dc75465d0b64441113bc4055b2cd06b516 (diff)
Allow picking similar colours using OKHSL.
Diffstat (limited to 'doc')
-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">