CHDK Forum

CHDK Development => General Discussion and Assistance => DryOS Development => Topic started by: Bernd R on 19 / December / 2010, 05:01:21

Title: how can avoid that chdk change colors, when the func/set menu Canon menu is sh
Post by: Bernd R on 19 / December / 2010, 05:01:21
when the firmware func/set menu is show, then the chdk colors of histogramm, menu and other color change to less readable colors.

in the file selector it is not possible to read the text entries then, because background and text color is same.

I find out, when i disable the palette set in camera.h , that the text in file selector can read then.

//#undef CAM_BITMAP_PALETTE
//#define CAM_BITMAP_PALETTE    5

But how i can get all colors correct working.
Have other Camera same problem ?
Title: Re: how can avoid that chdk change colors, when the func/set menu Canon menu is sh
Post by: whim on 19 / December / 2010, 05:20:38
Hi Bernd !

If you #undef CAM_BITMAP_PALETTE, it will default to value 1

I just looked through the list for cams in trunk, most use default, except:

SX 20                     -> uses 6

ixus100_sd780, D10  -> use 5

S90, G11                 -> use 4

SX 200                    -> uses 3

ixus980_sd990          -> uses 2

wim
Title: Re: how can avoid that chdk change colors, when the func/set menu Canon menu is sh
Post by: Bernd R on 29 / December / 2010, 05:09:11
I test now more what the color palette do.

I see in the chdk palette show, the IX 1000 HS have color 0 transparent.color 1 is white, 0x1d is dark gray and 0x1e is orange red and 0xff is black.

all other colors change depend on mode and random.
I find no red, green,blue in the palette, that is on all mode at same number.

So i need a way to set the rgb color of a named palette entrie.Is that possible ?

here i have the palette and the //ok after numbers show that the color is in all situations correct.only i need set rgb on other entries.

@asm1989

If you test that you need delete your Camera chdk config file.with that setting all text is better readable and OSD colors do not change to unreadable (when canon func/set is open to change ISO etc)
When chdk use not blue red green histogram or yellow.

#elif CAM_BITMAP_PALETTE==7 //(ixus 1000)
#define COLOR_TRANSPARENT   0x00  // ok
#define COLOR_WHITE         0x01  //ok
#define COLOR_RED           0x1e  // its orange but always same.
#define COLOR_GREY          0x12  // ok
#define COLOR_GREEN         0xBF
#define COLOR_BLUE_LT       0x7C
#define COLOR_BLUE          0x90
#define COLOR_YELLOW        0x53
#define COLOR_BLACK         0xff  //ok
#define COLOR_BG            0x1b  //ok
#define COLOR_FG            COLOR_WHITE
#define COLOR_SELECTED_BG   COLOR_RED
#define COLOR_SELECTED_FG   COLOR_WHITE
#define COLOR_ALT_BG        0x1b //ok
#define COLOR_SPLASH_RED    0x72
#define COLOR_SPLASH_PINK   0x5C
#define COLOR_SPLASH_GREY   0x16 //ok
#define COLOR_HISTO_R       COLOR_RED
#define COLOR_HISTO_R_PLAY  COLOR_RED
#define COLOR_HISTO_B       COLOR_BLUE
#define COLOR_HISTO_G       COLOR_GREEN
#define COLOR_HISTO_G_PLAY  COLOR_GREEN
#define COLOR_HISTO_BG      COLOR_BLUE_LT
#define COLOR_HISTO_RG      COLOR_YELLOW
#define COLOR_HISTO_RB      0x72
#define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB
#define COLOR_HISTO_B_PLAY  COLOR_HISTO_B
#define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT
#define COLOR_HISTO_RG_PLAY COLOR_YELLOW
#else
Title: Re: how can avoid that chdk change colors, when the func/set menu Canon menu is sh
Post by: waterwingz on 29 / December / 2010, 11:11:27
when the firmware func/set menu is show, then the chdk colors of histogramm, menu and other color change to less readable colors.

in the file selector it is not possible to read the text entries then, because background and text color is same.

I find out, when i disable the palette set in camera.h , that the text in file selector can read then.

Have other Camera same problem ?

@Bernd R  :  Same sort of problem for the SD940 port.   Menus and OSD objects change color depending on whether you are in Play or Shoot mode.  They are still readable but the color combinations tend to be really ugly.  I like to use transparent backgrounds where possible but this changes with mode.

Please continue to tell us what you learn in the forum thread ?  And let me know if I can do any testing to help out - I can rebuild the SD940 release as required.

I also wonder about your last question - do other versions of CHDK on different cameras have this problem and maybe people just live with it ?
Title: Re: how can avoid that chdk change colors, when the func/set menu Canon menu is sh
Post by: philmoz on 29 / December / 2010, 14:03:24
I also wonder about your last question - do other versions of CHDK on different cameras have this problem and maybe people just live with it ?

SX30 and G12 have the same problem. There is a very limited set of common colours and these are mostly restricted to black, white, shades of grey and some shades of orange.
For these cameras I've found the best background colour to use is 0x62.
This is semi-transparent in record mode and solid medium gray in play mode.
For the others I've just settled on using the common gray and orange colours.

Regards,
Phil.
Title: Re: how can avoid that chdk change colors, when the func/set menu Canon menu is sh
Post by: reyalp on 29 / December / 2010, 16:12:32
I also wonder about your last question - do other versions of CHDK on different cameras have this problem and maybe people just live with it ?
Many ports were done by people who had never seen CHDK on another camera. So it's safe to assume that the colors vary quite widely between ports, and differences only get noticed when something is really illegible.

I tried to copy the a540 on the ones I did (which is where the names in the palette defines come from), but I don't actually know that is "right".
Title: Re: how can avoid that chdk change colors, when the func/set menu Canon menu is sh
Post by: pixeldoc2000 on 29 / December / 2010, 19:29:00
Same problem on SD4000 and SX210 of cause ;)

I think this affects almost all recents camera (ports).

CHDK use only one fixed Palette to draw CHDK OSD.

On SD900 with VxWorks, Canon firmware use one fixed Color Palette with like 16 "base" colors + differents shades. It does never change no matter what Canon OSD is currently showing.
Color Palette has all required CHDK OSD Colors like red for CHDK Logo, rgb for Histogram, etc.

ON SD4000 with DryOs #0043, Canon firmware Color Palette is (changing) related to what Canon OSD is currently showing.
Some "required" CHDK colors like a clean red or blue does not exist in current Color Palette or only of canon firmware shows a certian Menu or OSD.
Domination colors are orange and grey with most palette.

To fix it we would more than one defined palette for affected cameras and support to switch between the palettes if needed.
Probably its time for camera specific color palette support?

Note: Use "ALT -> Miscellaneous stuff -> Draw palette" to view current Canon color palette.
Title: Re: how can avoid that chdk change colors, when the func/set menu Canon menu is sh
Post by: Bernd R on 30 / December / 2010, 04:47:10
Seem nobody know how can set a color in a palette entry.if this can work help a lot on the problem i think.

I see in the firmware asm dump i get some text that contain color.there is some code colortbl

ColorTBL

maybe this code can set the color register.Have other camera too ColorTBL text in ?

I guess that new camera have a function and you can pass a r g b value and Canon firmware return a palette entry for this, and if there is no palette entry existing, it create a new one by set of HW color register and return then the palette entry number.

I guess that Camera display work in 16 bit mode, because when i see in chdk funcs, there is return 960 for buffer width for this camera, but the display width is 480 Pixel.So 2 bytes /Pixel.

@waterwingz
>@Bernd R  :  Same sort of problem for the SD940 port.   Menus and OSD objects change color depending >on whether you are in Play or Shoot mode.  They are still readable but the color combinations tend to be >really ugly.  I like to use transparent backgrounds where possible but this changes with mode.

on IX 1000 its same, palette entry for dark transparent are only create when its need from firmware.for example if you show in view mode a picture and use view mode with paramter overlay, canon firmware use register 0x66 on IX1000 for that.but if you open Canon menu, then there is another color in 0x66

to avoid your color change problem you can try out to set menu background color to 0x1d or some of the entries 0x-0x1f.maybe on all camera are the values from 0-0x1f never change ?

If so, then you can use the palette 7 i post too(remember to delete your chdk config or change all colors in a config).

I think that there is a editor to edit chdk config in windows, but yesterday i search and find no link.can somebody post the link ?

 
Title: Re: how can avoid that chdk change colors, when the func/set menu Canon menu is sh
Post by: whim on 30 / December / 2010, 07:51:52
Hi Bernd,
Quote
I think that there is a editor to edit chdk config in windows, but yesterday i search and find no link.can somebody post the link ?

zcfgedit (http://www.zenoshrdlu.com/kapstuff/zcfgedit.html)

hth,

wim
Title: Re: how can avoid that chdk change colors, when the func/set menu Canon menu is sh
Post by: Bernd R on 30 / December / 2010, 08:30:25
thanks whim

this Editor have the problem that it give the colors a name and do not show the value.
I guess this work only with default pallette.

On my config file all colors are show with transparent:transparent.so color numbers need change still in Camera.
Title: Re: how can avoid that chdk change colors, when the func/set menu Canon menu is sh
Post by: reyalp on 30 / December / 2010, 12:18:20
Seem nobody know how can set a color in a palette entry.if this can work help a lot on the problem i think.
I think ewavr found some functions related to this, but if you change the palette, then the canon OSD will be affected too.

I suggest just picking colors that make the display legible and not worrying about the exact colors.
Title: Re: how can avoid that chdk change colors, when the func/set menu Canon menu is sh
Post by: Microfunguy on 30 / December / 2010, 13:13:38

I think ewavr found some functions related to this

I think that is in his PTP 'webcam' code and forum discussions.

Title: Re: how can avoid that chdk change colors, when the func/set menu Canon menu is sh
Post by: waterwingz on 30 / December / 2010, 14:21:58
I suggest just picking colors that make the display legible and not worrying about the exact colors.

The issues is not so much the exact colors as the fact that they change between shooting and review/play mode.   Looking at "ALT -> Miscellaneous stuff -> Draw palette" in both modes indicates that the first three rows colors don't change between modes so finding a legible choice of colors based only on those rows seems a reasonable compromise.
Title: Re: how can avoid that chdk change colors, when the func/set menu Canon menu is sh
Post by: Bernd R on 31 / December / 2010, 05:05:15
@waterwingz
>Draw palette" in both modes indicates that the first three rows colors don't change between modes so >finding a legible choice of colors based only on those rows seems a reasonable compromise.

On IX1000 Camera only first 2 rows - color 0x1f are always same.
the 3.rd row get when Canon Menu show lots of orange red color tint entries.they are gone, when canon Menu is close.

because of this palette 5 do not work good, because bg color is set in this palette to 0x22

I write a message to ewavr, and point to this thread, maybe he can tell more.

use of palette 7 values is good enough for me on IX1000(i need no 3 color show in histogramm), but if there is a way, to set colors perfectly is also welcome.
Title: Re: how can avoid that chdk change colors, when the func/set menu Canon menu is sh
Post by: reyalp on 31 / December / 2010, 12:41:04
I write a message to ewavr, and point to this thread, maybe he can tell more.

use of palette 7 values is good enough for me on IX1000(i need no 3 color show in histogramm), but if there is a way, to set colors perfectly is also welcome.
As I said before, changing the camera palette is probably not a good option. Get your port functional, worry about the cosmetic stuff later.