Skip to content

Conversation

@matanlurey
Copy link
Contributor

Post-submit feedback from #160798 (review).

@matanlurey matanlurey requested a review from gaaclarke January 3, 2025 20:28
@github-actions github-actions bot added the engine flutter/engine related. See also e: labels. label Jan 3, 2025
: this._fromARGBC(value >> 24, value >> 16, value >> 8, value, ColorSpace.sRGB);

/// Construct a color with normalized color components from `0.0` to `1.0`.
/// Construct a color with color components with a minimum value of `0.0`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't say minimum value of 0.0 either, the numbers go negative in extended SRGB.

/// components to be be supported. The values will be normalized relative to
/// the [ColorSpace] argument.
/// Color components allows arbitrary bit depths for color components to be be
/// supported. The values are interpted relative to the [ColorSpace] argument.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// supported. The values are interpted relative to the [ColorSpace] argument.
/// supported. The values are interpreted relative to the [ColorSpace] argument.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

///
/// A value of `0.0` represents no red in this color. A value of `1.0`
/// represents the maximum amount of red.
/// A value of `0.0` represents no red in this color.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove this too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. PTAL.

@matanlurey matanlurey requested a review from gaaclarke January 6, 2025 17:56
Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@matanlurey matanlurey changed the title Remove the word normalized, remove maximum of 1.0. Remove the word normalized, remove minimum/maximum. Jan 6, 2025
@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 6, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Jan 6, 2025
Merged via the queue into flutter:master with commit 5aa179e Jan 6, 2025
179 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 8, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 8, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 8, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 8, 2025
///
/// A value of `0.0` means this color is fully transparent. A value of `1.0`
/// means this color is fully opaque.
/// The alpha channel of this color.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was more clear before, if incorrect. I think we should provide some guidance on what each of a, r, and g mean and what are their bounds. Maybe something like:

For example, in the sRGB color space, where 0 is the maximum value and 255 is the minimum, a would be a value between 0 and 1.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine flutter/engine related. See also e: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants