RAL Color Chart
The RAL Classic chart, searchable, with screen approximations.
Convert a HEX code into Dart Color and MaterialColor code.
The Dart code appears here
HEX to Flutter Color writes the Dart literal with the alpha already in place — the thing everyone forgets once — and generates a complete MaterialColor swatch from 50 to 900 around your colour.
Flutter takes a colour as a 32-bit integer with the alpha channel first, written in Dart as Color(0xFF4F46E5). The leading FF is the alpha, and leaving it off is the mistake everyone makes once — the colour comes out fully transparent and nothing appears.
This writes the literal for you, with the alpha in place and adjustable, along with the Color.fromARGB form if you prefer the channels spelled out. Both are shown because codebases tend to settle on one.
The MaterialColor swatch is the more useful output. Flutter theming expects a swatch with ten shades from 50 to 900, and hand-writing one is tedious. The tool generates the whole swatch from your colour, keeping it as the 500, and emits the complete MaterialColor definition ready to drop into a theme — plus a ColorScheme.fromSeed line for projects on Material 3.
Color(0x4F46E5) is invisible because its alpha is zero. The output always carries the leading FF.
Ten shades from 50 to 900 built around your colour as the 500, which is what primarySwatch needs.
The hex literal and Color.fromARGB, because codebases settle on one or the other.
A ColorScheme.fromSeed call for projects that derive the whole scheme from one seed colour.
The MaterialColor definition is complete and correctly formatted — it goes straight into a theme file.
Six digits, or eight if you want a specific alpha.
Color(0xFF…) with the alpha already in place, or the fromARGB form.
A full MaterialColor from 50 to 900, built around your colour as the 500.
The definition is complete Dart — paste it straight into a theme file.
Almost always a missing alpha. Color(0x4F46E5) has an alpha of 0x00 and is invisible. It needs eight digits: Color(0xFF4F46E5).
Material widgets ask a swatch for specific shades — a lighter one for a splash, a darker one for a pressed state. A plain Color has no shades, so primarySwatch needs a MaterialColor.
Less often. ColorScheme.fromSeed derives a full scheme from a single colour, which is the modern approach. Swatches are still needed for Material 2 widgets and for explicit shade references.
Effectively, yes — it returns a copy with the alpha replaced. Note that newer Flutter versions deprecate it in favour of withValues(alpha:), which avoids a precision loss on wide gamut colours.
What people who use the HEX to Flutter Color think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the HEX to Flutter Color. It takes half a minute and no account.
Write the first reviewThe RAL Classic chart, searchable, with screen approximations.
Generate matching light and dark themes from one colour.
Generate a Material palette, primary through A700.
Pick a colour from anywhere on your screen.
Check any text and background pair against WCAG AA and AAA.
Convert LCH to HEX and RGB — LAB in polar form, as CSS uses it.
Build a duotone pair and get the CSS to apply it.
Convert to and from HWB, the hue-whiteness-blackness notation.