-
-
Notifications
You must be signed in to change notification settings - Fork 20.9k
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
C#: Synchronize Color with Core #69867
Conversation
@@ -597,7 +643,7 @@ public Color(string code, float alpha) | |||
/// <exception name="ArgumentOutOfRangeException"> | |||
/// <paramref name="rgba"/> color code is invalid. | |||
/// </exception> | |||
private static Color FromHTML(ReadOnlySpan<char> rgba) | |||
public static Color FromHTML(ReadOnlySpan<char> rgba) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to also implement an overload that takes String for .NET languages that don't support Spans (I think F# supports them, so it's probably only VB).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't they support spans? And not even for casting from a string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because, AFAIK, VB doesn't support ref structs so the method can't be called.
a9b532b
to
c046f53
Compare
- 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.
c046f53
to
d843a7a
Compare
Removed |
Thanks! |
Luminance
readonly property.LinearToSrgb
andSrgbToLinear
static methods.to_linear()
andto_srgb()
to scripting #59456.FromOkHsl
static method.FromRgbe9995
static method.FromString
static method.FromHtml
static method.HtmlIsValid
static method.