Commit Graph

97 Commits

Author SHA1 Message Date
cbe3bf7511 Fix docs for Color class regarding bits per component.
This fixes godot-docs#8906 ( https://github.com/godotengine/godot-docs/issues/8906 )

(cherry picked from commit 0e977e087c)
2024-03-11 15:13:03 +01:00
8e9852fa43 Future proof links in docs 2023-09-02 10:51:58 +02:00
779ac20bb9 Clarify doc for Color.hex and C# Color()
The "alpha channel first" seems misleading to me. It doesn't match with
the examples, so remove it. Add a more detailed specification of the
expected number format in hex.
2023-05-30 15:15:04 +02:00
04562662d3 Overhaul the top sections of the class reference (Core classes) 2023-05-19 07:04:48 +02:00
f83a90192f Revert "Add API for HSL conversion"
This reverts commit 0b7fd664c1.
2023-05-10 17:45:56 -03:00
0b7fd664c1 Add API for HSL conversion
Math ported pretty much 1:1 from https://en.wikipedia.org/wiki/HSL_and_HSV
Style doesn't match the existing HSV code exactly, but should be close enough.
2023-05-09 17:43:10 +02:00
1c1524a651 Bump version to 4.1-dev
Can't stop, won't stop, they said, huh?
2023-03-01 01:44:37 +01:00
43f62a588b More class reference fixes
Mostly typos. Also renamed the remaining "Vulkan Clustered" to "Forward+".
2023-02-24 10:42:44 +08:00
8d0078873a Fix incorrect format in Color documentation 2023-02-14 10:27:43 +01:00
7eb8325180 Fix C# examples in documentation
- Fix documentation after C# renames.
- Add missing `partial` in C# class declarations.
- Change `delta` parameter type to `double` in C#.
- Ensure parameters match base declaration.
- Use `$` string interpolation in C#.
- Fix invalid or outdated C# code.
- Changed some examples to follow our style guide more closely.
2023-01-31 19:04:07 +01:00
5b1df48c6c Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
d843a7ab97 C#: Synchronize Color with Core
- Add `Luminance` readonly property.
- Add `LinearToSrgb` and `SrgbToLinear` static methods.
- Add `FromOkHsl` static method.
- Add `FromRgbe9995` static method.
- Add `FromString` static method.
- Expose `FromHtml` static method.
- Expose `HtmlIsValid` static method.
- Add and update some Color documentation.
2022-12-16 03:04:05 +01:00
6c6c8c2bc7 Tweak Color Documentation 2022-12-05 17:15:59 +01:00
f7c611ab71 Style: Misc docs and comment style and language fixes
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02 19:01:18 +01:00
653e8f5c86 Remove internal functions of named colors from the public API 2022-10-21 11:21:43 +03:00
1b7aee3c8d Fill random docs 2022-10-07 20:10:18 +02:00
d32803fdd6 [doc] Use "param" instead of "code" to refer to parameters (7) 2022-08-12 13:19:48 -04:00
c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
c8ce7e34e2 i18n: Misc fixes translation strings
Adds some translator comments to solve some questions raised on Weblate.
2022-06-08 12:57:54 +02:00
1b776a6e7a Allow picking similar colours using OKHSL. 2022-06-07 05:53:27 -07:00
46ef52162e Color: Rename to_srgb/to_linear to include base color space
This helps reduce confusion around sRGB <> Linear conversions by making
both input and output color spaces explicit.
2022-04-13 11:45:52 +02:00
1c343cd54d Expose Color's to_linear() and to_srgb() to scripting 2022-03-28 12:17:55 +02:00
8ed8a7a22b doc: Sync missing Color value update after #59229
Missed in CI as the Mono build where this is checked is temporarily disabled.
2022-03-17 19:53:10 +01:00
32f2c47356 Remove generating of null comparison operators from documentation 2022-03-14 22:35:23 +03:00
b68dd2e189 Add an XML schema for documentation
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.

Each class XML's schema conformance is also checked on GitHub Actions.
2022-02-15 00:03:31 +01:00
d5ea8547d6 Correct C# code example in Color class reference
Correct C# example code for html method in the Color class reference.
2022-02-09 20:26:51 +11:00
acd562be5d Add method descriptions to Color Class Reference
Add definitions and code examples for the html and html_is_valid methods
2022-02-08 16:37:11 +11:00
3ec5a5fb5c Alpha channel indicates opacity, not transparency 2021-12-24 16:52:15 +08:00
1fb59d13c2 Fix font preview text color on light background 2021-12-18 00:34:28 +08:00
471e7cbfc7 Merge pull request #54581 from aaronfranke/operator-docs 2021-11-16 14:10:09 +01:00
e2e9b08cc7 Color: Bind from_hsv as static method 2021-11-11 11:50:02 +01:00
813466b3c8 Add documentation to operators for math types
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2021-11-04 14:44:55 -05:00
6772ebcea0 Move the docs for constructors and operators out of methods section 2021-10-29 12:34:57 -05:00
455e142d37 Allow comparing equality between builtin types and null 2021-09-17 12:33:52 -03:00
7adf4cc9b5 doc: Use self-closing tags for return and argument
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
2021-07-30 15:29:52 +02:00
b1d15c51bc Implement native extension system
* Deprecates GDNative in favor of a simpler, lower level interface.
* New extension system allows registering core engine classes.
* Simple header interface in gdnative_interace.h
2021-06-25 17:32:45 -03:00
0ff4095b36 Better format arguments in variant parser 2021-06-18 00:06:40 -03:00
2e13e3ed4a Allow clamping vectors and colors 2021-06-03 12:05:20 -04:00
bcbd480c32 Merge pull request #45144 from dalexeev/color-consts
Rename color constants (alternative)
2021-05-07 12:22:49 +02:00
d13cfc8d62 Docs: Minor argument names fix 2021-04-23 15:46:51 +02:00
4ca1e73ff9 doc: Sync classref with current source
And move GLTF docs to its module folder.
2021-03-18 16:37:43 +01:00
f55445079a Replace ColorN and from HTML with a string constructor 2021-02-01 17:27:19 -05:00
a97f1a3dc6 Rename color constants (alternative)
Named color constants renamed to UPPERCASE. Unlike #41019, this PR
is complete and implements these changes in the simplest way possible.

Co-authored-by: Shivam Mukherjee <mshivam98@gmail.com>
2021-01-26 19:07:00 +03:00
215d18814e doc: Sync classref with current source 2021-01-04 14:33:44 +01:00
5465e604bb Improve argument names for core types 2020-12-07 05:01:33 -05:00
1a001ad964 doc: Sync classref with current source
And fixups:
- Add missing bindings in RenderingServer
- Remove duplicate ArrayMesh enum bindings (they're in Mesh already)
- Remove redundant _unhandled_key_input binding in Control (it's in Node
  already)
2020-12-04 22:28:08 +01:00
4b272b18ea Improve comments in Color documentation 2020-11-13 23:31:19 -05:00
64e893deac doc: Sync classref to add operators after #43419 2020-11-10 15:00:50 +01:00
0f249f5c0a Variant: Sync docs with new constructors, fixups after #43403
Change DocData comparators for MethodDoc and ArgumentDoc to get a better
ordering of constructors.
2020-11-09 23:39:53 +01:00
52c1b5fc41 Merge pull request #43283 from Calinou/color-remove-contrasted
Remove `Color.contrasted()` as its behavior is barely useful
2020-11-06 10:17:12 +01:00