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

Consider changing the Color.lerp implementation to more naturally handle transparency #48534

Open
sooxt98 opened this issue Jan 9, 2020 · 16 comments
Labels
a: animation Animation APIs c: API break Backwards-incompatible API changes engine flutter/engine repository. See also e: labels. found in release: 3.3 Found to occur in 3.3 found in release: 3.6 Found to occur in 3.6 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list team-engine Owned by Engine team triaged-engine Triaged by Engine team

Comments

@sooxt98
Copy link

sooxt98 commented Jan 9, 2020

Simply run with dart pad and press the FAB button. I'm not show is AnimatedContainer problem or SKIA colour rendering problem.

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Transparent Issue',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Colors.transparent issue'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  bool isColorSwap = true;

  void _incrementCounter() {
    setState(() {
      isColorSwap = !isColorSwap;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: <Widget>[
            Expanded(
                child: AnimatedContainer(
                    child: Center(child: Text('fade between white color')),
                    width: double.infinity,
                    duration: Duration(milliseconds: 500),
                    color: isColorSwap ? Colors.lightBlue[100] : Colors.white)),
            Expanded(
                child: AnimatedContainer(
                    child:
                        Center(child: Text('fade between transparent color')),
                    width: double.infinity,
                    duration: Duration(milliseconds: 500),
                    color: isColorSwap
                        ? Colors.lightBlue[100]
                        : Colors.transparent))
          ]),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'ClickMe',
        child: Icon(Icons.add),
      ),
    );
  }
}
@VladyslavBondarenko VladyslavBondarenko added a: animation Animation APIs framework flutter/packages/flutter repository. See also f: labels. c: rendering UI glitches reported at the engine/skia rendering level labels Jan 10, 2020
@dnfield dnfield removed the c: rendering UI glitches reported at the engine/skia rendering level label Jan 10, 2020
@dnfield dnfield changed the title Colors.transparent shows grayish when crossfading with others color Color.lerp goes grey when lerping between transparent and another color Jan 10, 2020
@dnfield
Copy link
Contributor

dnfield commented Jan 10, 2020

The relevant code affecting this is

(web)
https://github.com/flutter/engine/blob/7ef88f85d572aff504852f954f94831c031ba1a2/lib/web_ui/lib/src/ui/painting.dart#L172-L189

(non-web)
https://github.com/flutter/engine/blob/7ef88f85d572aff504852f954f94831c031ba1a2/lib/ui/painting.dart#L259-L273

This makes me think we should be special casing when a or b is completely transparent to just _scaleAlpha. But I'm also not really a color expert :)

@dnfield
Copy link
Contributor

dnfield commented Jan 10, 2020

It seems like this is by deisgn, see:

https://github.com/flutter/engine/blob/7ef88f85d572aff504852f954f94831c031ba1a2/lib/ui/painting.dart#L239-L245

You should either use HSVColor or you should avoid lerping to/from transparent black. Going to close this for now, please feel free to ping it if you think I've missed something.

@dnfield dnfield closed this as completed Jan 10, 2020
@dnfield
Copy link
Contributor

dnfield commented Jan 10, 2020

(e.g. if you set the second color to null instead of Colors.transparent, you'll get the scaleAlpha lerping)

@sooxt98
Copy link
Author

sooxt98 commented Jan 10, 2020

@dnfield Hi, please reopen the issue, AnimatedContainer can't work with null Color & HSV color

@dnfield
Copy link
Contributor

dnfield commented Jan 10, 2020

Ahh.

@dnfield dnfield reopened this Jan 10, 2020
@dnfield
Copy link
Contributor

dnfield commented Jan 10, 2020

I think null works, but HSV looks like it doesn't. We should fix that.

@dnfield dnfield changed the title Color.lerp goes grey when lerping between transparent and another color AnimatedContainer uses Color.lerp on HSVColors Jan 10, 2020
@dnfield dnfield added this to the Goals milestone Jan 10, 2020
@sooxt98
Copy link
Author

sooxt98 commented Jan 10, 2020

image
@dnfield null not working with AnimatedContainer in dartpad tho, it removes the animation

@dnfield
Copy link
Contributor

dnfield commented Jan 10, 2020

You're right, I missed it because of lightness of color.

@dnfield
Copy link
Contributor

dnfield commented Jan 10, 2020

/cc @goderbauer

This does work out the way you want if you use Colors.lightBlue[100].withOpacity(0) instead of Colors.transparent - now you're lerping to transparent lightBlue[100].

Talked offline with @goderbauer about this - it migh tbe worth adding a method to Color that returns a lerping function. On the Color class, it returns Color.lerp, on the HSVColor class, it returns HSVColor.lerp.

I'm not sure how to decide who wins if you tried to lerp from Colors.lightBlue[100] to HSVColor(...) though.

@t-artikov
Copy link

I don’t think HSVColor.lerp will help. The problem is how transparency is taken into account when interpolating. The right way is to use opacity as extra weight for color components.
Using this method in the original example solves the issue:
https://dartpad.dev/2c4fd13afde20aed0fadad0dc5db0694

I believe this is how color interpolation should work in Flutter by default.

@t-artikov
Copy link

A similar problem with gradients:
#48674

@dnfield
Copy link
Contributor

dnfield commented Jan 12, 2020

I'm going to file a separate bug for the HSVColor lerp thing. I'm going to edit this one to be for the engine's Color.lerp.

@dnfield dnfield changed the title AnimatedContainer uses Color.lerp on HSVColors Consider changing the Color.lerp implementation to more naturally handle transparency Jan 12, 2020
@dnfield dnfield added engine flutter/engine repository. See also e: labels. c: API break Backwards-incompatible API changes and removed framework flutter/packages/flutter repository. See also f: labels. labels Jan 12, 2020
@dnfield dnfield self-assigned this Feb 4, 2020
@dnfield dnfield modified the milestones: Goals, April 2020 Feb 4, 2020
@Hixie Hixie modified the milestones: April 2020, Overdue May 5, 2020
@dnfield dnfield modified the milestones: Overdue, August 2020 May 6, 2020
@kf6gpe kf6gpe added the P1 High-priority issues at the top of the work list label May 29, 2020
@dnfield dnfield removed their assignment Aug 14, 2020
@dnfield dnfield removed this from the 1.22 - August 2020 milestone Aug 14, 2020
@dnfield
Copy link
Contributor

dnfield commented Aug 14, 2020

I'm unassigning this since it will take a fair amount of work to migrate internal customers for it. I think it'd be good to do, but would like more evidence about the number of customers impacted before moving forward with it.

@chinmaygarde chinmaygarde added P2 Important issues not at the top of the work list and removed P1 High-priority issues at the top of the work list labels Aug 31, 2020
@TahaTesser
Copy link
Member

TahaTesser commented Dec 4, 2020

issue code sample
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Transparent Issue',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Colors.transparent issue'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  bool isColorSwap = true;

  void _incrementCounter() {
    setState(() {
      isColorSwap = !isColorSwap;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: <Widget>[
            Expanded(
                child: AnimatedContainer(
                    child: Center(child: Text('fade between white color')),
                    width: double.infinity,
                    duration: Duration(milliseconds: 500),
                    color: isColorSwap ? Colors.lightBlue[100] : Colors.white)),
            Expanded(
                child: AnimatedContainer(
                    child:
                        Center(child: Text('fade between transparent color')),
                    width: double.infinity,
                    duration: Duration(milliseconds: 500),
                    color: isColorSwap
                        ? Colors.lightBlue[100]
                        : Colors.transparent))
          ]),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'ClickMe',
        child: Icon(Icons.add),
      ),
    );
  }
}
flutter doctor -v
[✓] Flutter (Channel master, 1.25.0-5.0.pre.64, on macOS 11.0.1 20B29
    darwin-x64, locale en-GB)
    • Flutter version 1.25.0-5.0.pre.64 at /Users/tahatesser/Code/flutter_master
    • Framework revision 4d4d017aa5 (6 hours ago), 2020-12-03 21:38:10 -0800
    • Engine revision 20caf54969
    • Dart version 2.12.0 (build 2.12.0-76.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/tahatesser/Code/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/tahatesser/Code/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.2, Build version 12B45b
    • CocoaPods version 1.10.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.51.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (4 available)
    • RMX2001 (mobile)     • EUYTFEUSQSRGDA6D          • android-arm64  •
      Android 10 (API 29)
    • Taha’s iPad (mobile) • 00008020-000255113EE8402E • ios            • iOS
      14.2
    • macOS (desktop)      • macos                     • darwin-x64     • macOS
      11.0.1 20B29 darwin-x64
    • Chrome (web)         • chrome                    • web-javascript • Google
      Chrome 87.0.4280.88

• No issues found!

@TahaTesser TahaTesser added found in release: 1.25 Found to occur in 1.25 has reproducible steps The issue has been confirmed reproducible and is ready to work on labels Dec 4, 2020
@danagbemava-nc
Copy link
Member

Still reproducible on the latest versions of flutter.

recording
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2022-11-29.at.10.56.56.mp4
code sample
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Transparent Issue',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Colors.transparent issue'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  bool isColorSwap = true;

  void _incrementCounter() {
    setState(() {
      isColorSwap = !isColorSwap;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Column(
        crossAxisAlignment: CrossAxisAlignment.stretch,
        children: <Widget>[
          Expanded(
              child: AnimatedContainer(
                  width: double.infinity,
                  duration: const Duration(milliseconds: 500),
                  color: isColorSwap ? Colors.lightBlue[100] : Colors.white,
                  child: const Center(child: Text('fade between white color')))),
          Expanded(
              child: AnimatedContainer(
                  width: double.infinity,
                  duration: const Duration(milliseconds: 500),
                  color: isColorSwap ? Colors.lightBlue[100] : Colors.transparent,
                  child: const Center(child: Text('fade between transparent color'))))
        ],
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'ClickMe',
        child: const Icon(Icons.add),
      ),
    );
  }
}
flutter doctor -v
[✓] Flutter (Channel stable, 3.3.9, on macOS 13.0.1 22A400 darwin-arm, locale en-GB)
    • Flutter version 3.3.9 on channel stable at /Users/nexus/dev/sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b8f7f1f986 (7 days ago), 2022-11-23 06:43:51 +0900
    • Engine revision 8f2221fbef
    • Dart version 2.18.5
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14B47b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio
    • Android Studio at /Applications/Android Studio Preview.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[!] Android Studio
    • Android Studio at /Applications/Android Studio Preview 2.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] Android Studio (version 2021.3)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] Android Studio (version 2021.3)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9014738/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.73.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.52.0

[✓] Connected device (3 available)
    • iPhone 14 Pro (mobile) • 4F72110C-F38B-4CF9-93C4-4D6042148D28 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-1 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 13.0.1 22A400 darwin-arm
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 107.0.5304.110

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 2 categories.
[!] Flutter (Channel master, 3.6.0-10.0.pre.12, on macOS 13.0.1 22A400 darwin-arm64, locale en-GB)
    • Flutter version 3.6.0-10.0.pre.12 on channel master at /Users/nexus/dev/sdks/flutters
    ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 853b3080e0 (6 hours ago), 2022-11-29 00:24:25 -0500
    • Engine revision ee8023432a
    • Dart version 2.19.0 (build 2.19.0-430.0.dev)
    • DevTools version 2.19.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14B47b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio
    • Android Studio at /Applications/Android Studio Preview.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[!] Android Studio
    • Android Studio at /Applications/Android Studio Preview 2.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] Android Studio (version 2021.3)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] Android Studio (version 2021.3)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9014738/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.73.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.52.0

[✓] Connected device (3 available)
    • iPhone 14 Pro (mobile) • 4F72110C-F38B-4CF9-93C4-4D6042148D28 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-1 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 13.0.1 22A400 darwin-arm64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 107.0.5304.110

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 3 categories.

@danagbemava-nc danagbemava-nc added found in release: 3.3 Found to occur in 3.3 found in release: 3.6 Found to occur in 3.6 and removed found in release: 1.25 Found to occur in 1.25 labels Nov 29, 2022
SputNikPlop added a commit to muxable/rtchat that referenced this issue May 8, 2023
This was on my old computer it should be rolling around soon flutter/flutter#55092 some more animations and stuff can be added as well after flutter/flutter#48534
SputNikPlop added a commit to muxable/rtchat that referenced this issue May 12, 2023
This was on my old computer it should be rolling around soon flutter/flutter#55092 some more animations and stuff can be added as well after flutter/flutter#48534
@flutter-triage-bot flutter-triage-bot bot added team-engine Owned by Engine team triaged-engine Triaged by Engine team labels Jul 8, 2023
@renanyoy
Copy link

renanyoy commented Oct 1, 2023

also you shoudl check HSVColor.lerp() a lerp at 0.5 from a dark blue to white returns a yellow green color ???
same with HSLColor.lerp() not at all what's returned using apple kits.

would be also nice that AnimatedContainer widget uses HSVColor.lerp() for color transitions when fixed, it will be a lot more natural and elegant..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: animation Animation APIs c: API break Backwards-incompatible API changes engine flutter/engine repository. See also e: labels. found in release: 3.3 Found to occur in 3.3 found in release: 3.6 Found to occur in 3.6 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list team-engine Owned by Engine team triaged-engine Triaged by Engine team
Projects
None yet
Development

No branches or pull requests

10 participants