Skip to content

Commit

Permalink
Update color API tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Sep 13, 2024
1 parent 422f037 commit 34f98c7
Show file tree
Hide file tree
Showing 2 changed files with 262 additions and 167 deletions.
8 changes: 6 additions & 2 deletions lib/src/value/color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class SassColor extends Value {
/// [missing]: https://www.w3.org/TR/css-color-4/#missing
///
/// @nodoc
@internal
final double? channel0OrNull;

/// This color's second channel.
Expand Down Expand Up @@ -118,6 +119,7 @@ class SassColor extends Value {
/// [missing]: https://www.w3.org/TR/css-color-4/#missing
///
/// @nodoc
@internal
final double? channel1OrNull;

/// Returns whether this color's third channel is [missing].
Expand Down Expand Up @@ -156,6 +158,7 @@ class SassColor extends Value {
/// [missing]: https://www.w3.org/TR/css-color-4/#missing
///
/// @nodoc
@internal
final double? channel2OrNull;

/// The format in which this color was originally written and should be
Expand Down Expand Up @@ -624,8 +627,9 @@ class SassColor extends Value {

/// Converts this color to [space].
///
/// If [legacyMissing] is false, this will convert missing channels in
/// legacy color spaces to zero if a conversion occurs.
/// If [legacyMissing] is false, this will convert missing channels in legacy
/// color spaces to zero if a conversion occurs. Otherwise, they remain
/// missing after the conversion.
SassColor toSpace(ColorSpace space, {bool legacyMissing = true}) {
if (this.space == space) return this;

Expand Down
Loading

0 comments on commit 34f98c7

Please sign in to comment.