There is no two meaning. 0-17 values are just entries in an array. When they are put into uni_colors it just returns 0-255 usual value.
In compare about what we have now - there is a default color scheme (in the meaning - all things have their default colors). So for example for selected item is COLOR_RED which in one camera might mean 0xA0. But user can change it to whatevet 0-255 value, but then he's only responsible of which color he will have in which mode...
After this change default value would be COLOR_UNI_RED which in source would mean 'uni_color(3)', where value is predefined for each palette (like COLOR_RED now). And user can change it in whatever he want, just like now.
Remember, that all draw_xxx functions will still see 0-255 values. Is no matter, wheter this is predefined as COLOR_RED or it's returned by COLOR_UNI_RED which means the same as uni_color(3)
The difference is that the value is not hard-written by preprocessor but it's run-time calculated.
However, I understand that some problems with config might appear. And this way I think that config should have 0-255 values as now.
Maybe it's better idea to try to work on this a little bit more and present version that can use config. I hope I'll do this in a way that will be compatible with current CCHDK.CONF. (However to not afraid of breaking the compatibility was one of the advantages of separate unstable 1.1 branch
)
Current patch does not break any compatibility (but I understand that if nothing will be done in future is a little bit useless...).
When I'll have some more results I'll start a separated thread. Or if you like to add some more suggestions or possible solutions please do this. I'm open to all discussions and like to just a little bit clean up complicated colors system in CHDK.
PS. Note that having this function we would not have to export all color defines for modules as it's now, but only uni_color() function!
EDIT
I made a small but important mistake in first sentence. There was written 'There is now two...' and should be 'There is no two...' - Now is correct...