For CSS files in VS Code, a color picker is provided next to the color's definition for easy selection as shown in the screenshot below:

example.css
#p1 {background-color: #ff0000;}
#p2 {background-color: hsl(120, 100%, 50%);}
#p3 {background-color: rgba(0, 4, 255, 0.733);}
It'd be a handy feature for Flutter.
Also, showing the color next to the definition may be better than showing it at the margin -- especially when multiple colors are defined on the same line.