I have a mysql database with a string field called “color” from java
I keep the value so:
// (2=color field)
pst.setString (2, objeto.getBackground (). getRGB ())
and then I read it like this:
objeto.setBackground (Color.decode (rs.getString ("color")))
Is there any function in mysql or php to read the color?
What do you want exactly?
Convert a int to a color in #RRGGBB format?
or get the R, G, B values?
or create a int from rgb values