GtkColorButton Deprecation



Hi,

i was migration some code from GtkColorButton to the GtkColorChooser interface today. I was storing a color palette of 3x16 colors (R + G + B) as 16bit integers before which looked something like this:

        "{"\
        0x2e2e, 0x3434, 0x3636,\
        0xcccc, 0x0000, 0x0000,\
        0x4e4e, 0x9a9a, 0x0606,\
        ...
        0xadad, 0x7f7f, 0xa8a8,\
        0x3434, 0xe2e2, 0xe2e2,\
        0xeeee, 0xeeee, 0xecec}"

However with the new ColorChooser interface I now have to store doubles instead of ints. If I convert the values to doubles and then store them in the same way, it doesnt' look like a very clean solution to me. So I was wondering if there isn't any cleaner and easier solution for this?

        "{"\
        0.180392156863, 0.203921568627, 0.211764705882,\
        ...
        ...}"

Regards
Sebastian


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