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

Clarify C# Color opacity comment #88909

Merged
Merged
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
16 changes: 13 additions & 3 deletions modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public struct Color : IEquatable<Color>
public float B;

/// <summary>
/// The color's alpha (transparency) component, typically on the range of 0 to 1.
/// The color's alpha component, typically on the range of 0 to 1.
/// A value of 0 means that the color is fully transparent.
/// A value of 1 means that the color is fully opaque.
/// </summary>
public float A;

Expand Down Expand Up @@ -534,7 +536,11 @@ public readonly string ToHtml(bool includeAlpha = true)
/// <param name="r">The color's red component, typically on the range of 0 to 1.</param>
/// <param name="g">The color's green component, typically on the range of 0 to 1.</param>
/// <param name="b">The color's blue component, typically on the range of 0 to 1.</param>
/// <param name="a">The color's alpha (transparency) value, typically on the range of 0 to 1. Default: 1.</param>
/// <param name="a">
/// The color's alpha value, typically on the range of 0 to 1.
/// A value of 0 means that the color is fully transparent.
/// A value of 1 means that the color is fully opaque.
/// </param>
public Color(float r, float g, float b, float a = 1.0f)
{
R = r;
Expand All @@ -547,7 +553,11 @@ public Color(float r, float g, float b, float a = 1.0f)
/// Constructs a <see cref="Color"/> from an existing color and an alpha value.
/// </summary>
/// <param name="c">The color to construct from. Only its RGB values are used.</param>
/// <param name="a">The color's alpha (transparency) value, typically on the range of 0 to 1. Default: 1.</param>
/// <param name="a">
/// The color's alpha value, typically on the range of 0 to 1.
/// A value of 0 means that the color is fully transparent.
/// A value of 1 means that the color is fully opaque.
/// </param>
public Color(Color c, float a = 1.0f)
{
R = c.R;
Expand Down
Loading