where to get flutter color code
i wanna change background color using hexa color. But I can only pickup flutter defaults values
class _SplashState extends State<Splash> {
var customFontWhite = GoogleFonts.coiny(
textStyle:
const TextStyle(color: Colors.white, letterSpacing: 3, fontSize: 28));
@override
Widget build(BuildContext context) {
// ignore: prefer_const_constructors
return Scaffold(
backgroundColor: Colors.red,
body: Center(
child: Text(
'Tic-Tac-Toy',
style: customFontWhite,
),
),
);
}
CodePudding user response:
You can use it like this:
backgroundColor: Color(0xFFff4b4b),
CodePudding user response:
For this you can use Color();
, don't forget to start always with 0xFF
Color(0xFFYour color);
CodePudding user response:
You can use hexa colors without using any packages, just type
Color(0xffff4b4b)