Gdk::Color(ffffff) is allmost black

in the documentation at about
Gdk::Color::Color(const Glib::ustring& value)  is written:
1.) "The text string can be in any of the forms accepted by XParseColor"
the documentation for XParseColor (for example
           says that strings like
<red>/, /<green>/, /<blue>/ := /h/ | /hh/ | /hhh/ | /hhhh/ / h/ := single hexadecimal digits (case insignificant)
           are valid.
so my assumtion was that Color("rgb:ff/ff/ff") should be white .... but it's allmost black too. the docu for XParseColor says also, that for backward compatibilty strings like
               #RGB                  (4 bits each)
               #RRGGBB          (8 bits each)
           are valid too, and yes Color("#ffffff") is white as it should.
2.) "... or a hex specification such as 305050" well, Color("305050") is just the same dark stuff (yes, it should be dark), while Color("#305050") looks a bit brighter; indeed, as you might guess Color("ffffff") just looks like Color("305050")

i know that's just bagatelle, because i get all the colors i want with #...., and mostly a simple Color("white"), Color("blue") is all i need, but if i didn't misundersood something really badly there may be a bug in the documentation or eaven the library (i'm still using 2.4.5) ... [i hope i haven't ignored a section in the gtkmm book again :-)]

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]