require'drawings'return draw.unpack_cnf_colors(get_config_value(require'gen/cnf_osd'.menu_color))-- returns numbers like 258, 269set_config_value(require'gen/cnf_osd'.menu_color,draw.pack_cnf_colors('green','magenta'))set_config_value(require'gen/cnf_osd'.menu_color,draw.pack_cnf_colors(258,269))
Looks like the color IDs being left out was a mistake. I fixed this in trunk r6237, stable r6239In trunk 6238, I added two new functions to drawings.luadraw.pack_cnf_colors(fg,bg) takes two colors in the system used by lua drawings (0-255 for native colors, 256-275 for chdk colors, or string names) and turns them into a number for use with set_config_valuedraw.unpack_cnf_colors(v) takes a number returned by get_config_value and returns the foreground and background color as numbers in the script system.ExamplesCode: [Select]require'drawings'return draw.unpack_cnf_colors(get_config_value(require'gen/cnf_osd'.menu_color))-- returns numbers like 258, 269set_config_value(require'gen/cnf_osd'.menu_color,draw.pack_cnf_colors('green','magenta'))set_config_value(require'gen/cnf_osd'.menu_color,draw.pack_cnf_colors(258,269))I'm not really inclined to add new config values to set the color of the console separately from the menu color, but maybe I could be convinced
The optimum functionality would be away to control the colour of individual letters (fg,bg) in console text strings, however, I accept that may not be possible. For example creating a console text string to print, made up of substrings, each with their own colour states. If the above is not possible, then a Lua command to control the colour of a line of console text would be a great additional feature to enhance the informational content, ie through colour.
Started by Duncan Feature Requests
Started by kerry RAW Shooting and Processing
Started by viktorzk General Discussion and Assistance
Started by HarpoMa General Discussion and Assistance
Started by shinnen LUA Scripting