Custom Colors : standardizing a semi-transparent grey - page 4 - General Discussion and Assistance - CHDK Forum

Custom Colors : standardizing a semi-transparent grey

  • 106 Replies
  • 37928 Views
Re: Custom Colors : standardizing a semi-transparent grey
« Reply #30 on: 24 / October / 2014, 20:01:19 »
Advertisements
Looks like a timing thing, my G12 is fine; but the G1X briefly shows a white splash screen, then switches to correct colors.
Logo now displays correctly in RED immediately on start-up although the rounded rectangle outline of the CHDK RAW part of the logo shows up yellow and then switches to black.

Time to look at the transparent grey.
I think that I just realized how great this will be for the CHDKplus.lua script.
« Last Edit: 24 / October / 2014, 20:26:08 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Custom Colors : standardizing a semi-transparent grey
« Reply #31 on: 24 / October / 2014, 21:31:58 »
Inspired by waterwingz' colors.lua script, I've added a color test mode to the palette module in revision 3689.

Access it from the CHDK Settings -> Color Settings --> CHDK Color Test menu.

It shows three pages of colors (use left & right to change page).
- System colors (e.g. COLOR_RED, COLOR_WHITE, etc)
- Histogram colors (e.g. COLOR_PLY_xxx and COLOR_REC_xxx)
- Script / Icon colors (e.g. COLOR_ICON_PLY_xxx and COLOR_ICON_REC_xxx)

Please use this to check all the colors in both record and playback mode, and report any discrepancies.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: Custom Colors : standardizing a semi-transparent grey
« Reply #32 on: 24 / October / 2014, 21:51:07 »
Please use this to check all the colors in both record and playback mode, and report any discrepancies.
Nice.  Works correctly in both modes on the A1200.

Although I did notice that you did not leave an 13th space in the Script/Icon colors for "semi-transparent" grey  8)
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Custom Colors : standardizing a semi-transparent grey
« Reply #33 on: 24 / October / 2014, 22:25:45 »
Seems like there are two choice to implement this:
  • Blindly add COLOR_TRANS_GREY to the custom color array and wait for anybody with one of the 47 custom palette enabled cameras to notice any whacky Canon colors.  Not a big risk - no crashes, just funny colors.  We fix anything found by either moving the patched array or changing it to #define COLOR_TRANS_GREY COLOR_GREY_LT (which the other 60+ cameras will be using anyway).
  • Add the extra custom color only to cameras that can be tested. The rest just get  #define COLOR_TRANS_GREY COLOR_GREY_LT 

Once this is implemented,   OSD text can use a semi-transparent background in both playback & shooting modes.  And script can safely use the tranparent background too.  MIght be nice to use it for the console background too.

Is this meant to replace the background color for text based OSD elements?

If so then defaulting to COLOR_GREY_LT will not work - the current OSD defaults are WHITE on DARK GREY.
WHITE on LIGHT GREY will look strange :)

Also, I think this needs to be a transparent medium to dark grey for cameras that will support it, to still allow for reasonable contrast for the white text against a light image.

For an initial implementation I'm thinking:
- add a new entry in 'load_chdk_palette' on a case by case basis (not big bang)
- define COLOR_GREY_DK_TRANS in the relevant platform_camera.h file as (CHDK_COLOR_BASE+13)
- if COLOR_GREY_DK_TRANS is not defined in palette.h after all the palette definitions set it to COLOR_GREY_DK
- add the necessary COLOR_ICON_xxx entries in palette.h and add it to script_colors
- update drawings.lua

This is a bit messy as it creates palette entries in the platform_camera.h file, not centralised in palette.h.
If we end up adding it to all cameras with custom palettes then this can be cleaned up.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: Custom Colors : standardizing a semi-transparent grey
« Reply #34 on: 24 / October / 2014, 23:07:22 »
Is this meant to replace the background color for text based OSD elements?
Only the default value.  User's can pick other choices in the Color Settings menu.

Quote
lf so, I think this needs to be a transparent medium to dark grey for cameras that will support it, to still allow for reasonable contrast for the white text against a light image.
Agreed - I didn't actually prototype any of this to see how it looked.  Just picked semi-trans colors from the existing ones in the pallete.  For the cams where I added a 13th overloaded color, I played with the hex values until I liked the % transmission.

Quote
- define COLOR_GREY_DK_TRANS in the relevant platform_camera.h file as (CHDK_COLOR_BASE+13)
- if COLOR_GREY_DK_TRANS is not defined in palette.h after all the palette definitions set it to COLOR_GREY_DK
I guess another choice is to put the 13th overload into all cams that can overload, wait for complaints, and then only add a separate define for cams where that is reported to not work and we can't figure out where to move the overloaded values?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Custom Colors : standardizing a semi-transparent grey
« Reply #35 on: 25 / October / 2014, 01:28:29 »
Here's a sample implementation of transparent grey for G12, G1X and IXUS310.

To try on other cameras copy the new entry from platform_camera.h and lib.c.
You may need to delete your OSD__4.cfg file so the new settings get used.

I think the transparent grey may need to be a bit darker - the OSD text seems to get a bit lost if the live view image is very bright.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Custom Colors : standardizing a semi-transparent grey
« Reply #36 on: 25 / October / 2014, 11:49:08 »
Works fine for the SX220. Also the level of  the transparent grey is ok. Maybe it could be a tick darker. There is no significant difference between the CHDK background and the background of the capture mode icon - see screenshot.

msl
CHDK-DE:  CHDK-DE links

Re: Custom Colors : standardizing a semi-transparent grey
« Reply #37 on: 25 / October / 2014, 12:08:38 »
There is no significant difference between the CHDK background and the background of the capture mode icon - see screenshot.
Confirmed.

Also works for the ixus120_sd940,  g10,  a1200, sx50hs, s100, powershot N (updated patch attached).  Tested in both playback & shooting modes,  with & without Canon menus and the Canon Func/Set menu.

Transparency looks good "as is" against white and dark backgrounds for cameras using AYUV where A=0x00, 0x01, 0x02, & 0x03. 

Cameras where <link> A= 0x00, 0x1F, 0x2F, & 0x3F  :

Code: [Select]
            pal[CHDK_COLOR_BASE+13] = 0x0090000;  // Transparent dark greydo not look good.   

The Powershot N already uses :

Code: [Select]
                pal[CHDK_COLOR_BASE+13] = 0x1F190000;   // Transparent Light Greybut that does is not appealing on the sx50hs.

I'll keep playing with it but my sx50 just left home for the day in search of more birds to photograph so it will be while until I have something better.
« Last Edit: 25 / October / 2014, 12:17:39 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Custom Colors : standardizing a semi-transparent grey
« Reply #38 on: 25 / October / 2014, 15:43:29 »
I now have the correct value so that the CHDK semitransparent background and the background of the capture mode icon match for both palette AYUV "A" types.

Patch file attached.

It also contains a small mod to add the value of the currently selected palette cell at the top of the palette display screen. Very handy when trying to match colors.  If there is no palette pointer defined for the patch, the change is ignored.

Also, all my palette 16 cameras can be safely moved to palette 13, making me think that we could most likely move the rest and just get rid of palette 16.  This probably applies to palette 15 too if we want to make the leap.

So other than a few more cameras tested, maybe all we need now is the Console background to be semitrans ?

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Custom Colors : standardizing a semi-transparent grey
« Reply #39 on: 25 / October / 2014, 17:11:23 »
Also, all my palette 16 cameras can be safely moved to palette 13, making me think that we could most likely move the rest and just get rid of palette 16.  This probably applies to palette 15 too if we want to make the leap.

Palettes 13, 15 & 16 still define different values for COLOR_GREY_DK, COLOR_GREY and COLOR_GREY_LT.

Quote
So other than a few more cameras tested, maybe all we need now is the Console background to be semitrans ?

The easiest way to fix the console is to use the conf.osd_color value instead of conf.menu_color.
This will display the console using the same colors as the other OSD text items (clock etc).

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

 

Related Topics


SimplePortal © 2008-2014, SimplePortal