what's the best way to store and retrieve colors from a database? string
or RGB values or...
Depends which colours.
If it's going to be only known colours such as Color.Red,
Color.SteelBlue then you could store the name and use Color.FromName to
re-create.
Otherwise you could store the [A]RGB values either separately or
combined and use Color.FromArgb to re-create.
Basically, the _best_ way, is the way that works for you :)
Use the System.Drawing. Color.ToArgb() method to get the integer value of
your color as a single value, and store that in the database. You can then
use the System.Drawing. Color.FromArgb( Int32) method in your app to get the
color from the integer.
Comment