flutteruser-interfacecolorswidget

Light Grey looks Greenish in Flutter


As you can see in the two image provided, light grey looks greenish despite reading a value of #F6F6F6 , then it looks normal after changing the scaffold background to White.

Are Flutter Widgets transparent by default ?!
Why changing the color of the Scaffold background seems to have an effect on widget color?
Is it a bug in Flutter ?

Take note this color bug is the same in physical device as in the emulator.

The code changed between two images

ThemeData(
   scaffoldBackgroundColor: Colors.white,
);

App Screen shows greenish widgets App Screen shows greyish widgets


Solution

  • The #F6F6F6 grey is perceived as "greenish" because the background is slightly pink (#FEF7FF), but those 2 greys are the same colour.

    (For more information, it might be possible to simulate the perceived greenish colour using CAM02 or CAM16 colour appearance models - models that take into account the viewing conditions of a colour to determine how it is perceived by human vision.)