Community
Participate
Working Groups
Implement the following color selection scheme for selected active tab begin/end as follows: Group 1 Rule: If at least 2 of the RGB values for TITLE_BACKGROUND_GRADIENT are equal to or between 181 and 255, then apply specified opacity for Group 1 Examples: Vista, XP Silver Gradient Top = Base colour + 75% white Gradient Bottom/Base colour = TITLE_BACKGROUND Group 2 Rule: If atleast 2 of the RGB values are equal to or between 100 and 180, then apply specified opacity for Group 2 Examples: XP Olive, OS X Graphite , GTK Gradient Top = Base colour + 75% white Gradient Bottom/Base colour = TITLE_BACKGROUND + 30% white Group 3 Rule: If atleast 2 of the RGB values are equal to or between 0 and 99, then apply specified opacity for Group 3 Examples: XP Blue, Wn Classic, Wn Plum, Wn Marine Gradient Top = Base colour + 75% white Gradient Bottom/Base colour = TITLE_BACKGROUND + 60% white Group 4 Rule: If each of the 3 RGB values are between 0-99, 100-180, and 181-255, then apply specified opacity for Group 4 Examples: OS X Blue Gradient Top = Base colour + 75% white Gradient Bottom/Base colour = TITLE_BACKGROUND + 30% white Group 5 - Exceptions Rule: No gradients are used for the High Contrast themes Examples: XP HC, Wn HC
Created attachment 62621 [details] Kelvin's mockup for the color rules
Created attachment 62622 [details] Initial patch implementing Kelvin's rules
Created attachment 62623 [details] Results comparing Kelvin's mockup to actual XP schemes
Note to Tod: if we go this route we'll need to remove DarkColorSelectionFactory.
On Vista I am getting {153, 180, 209} for TITLE_BACKGROUND, which doesn't fit Group 1 like it should, since Group 1 starts at 181. Thus we get Group3 and it looks too dark. Kelvin says to adjust Group1 to 180 as bottom threshold since his colour sample was showing both 180 and 181 for Vista.
Two comments: 1) This group/threshold approach seems to produce reasonable results for the default platform schemes but I am concerned that because its so threshold based that we may not get good results for all colour schemes. Had brief IM chat with Kelvin about moving to a HSB model which might lend itself to a single formula for computing the amount of white needed to get the colour where we need. 2) I miss the white text :(
Created attachment 63093 [details] Complete patch for Kelvin colours This patch should be evaluated for committing
A couple of things We shouldn't call the class KelvinColors - I suggest renaming to workbench colors The class comment was out of date I get the following NPE when I start Eclipse self hosted now at org.eclipse.swt.custom.CTabFolder.allocSelectionHighlightGradientColors(CTabFolder.java:3428) at org.eclipse.swt.custom.CTabFolder.setSelectionBackground(CTabFolder.java:3353) at org.eclipse.ui.internal.presentations.r33.PaneFolder.setSelectionBackground(PaneFolder.java:740) at org.eclipse.ui.internal.presentations.r33.DefaultTabFolder.updateColors(DefaultTabFolder.java:490) at org.eclipse.ui.internal.presentations.r33.DefaultTabFolder.shellActive(DefaultTabFolder.java:508) at org.eclipse.ui.internal.presentations.util.PresentablePartFolder$2.shellActivated(PresentablePartFolder.java:64) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:81) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:943) at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations.java:1591) at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:1832) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3668) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1554) at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1752) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4342) at org.eclipse.swt.internal.win32.OS.BringWindowToTop(Native Method) at org.eclipse.swt.widgets.Decorations.bringToTop(Decorations.java:227) at org.eclipse.swt.widgets.Shell.open(Shell.java:1068) at org.eclipse.jface.window.Window.open(Window.java:792) at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:735) at org.eclipse.ui.internal.Workbench$21.runWithException(Workbench.java:1037) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3650) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3287) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2284) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:152) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:359) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:174) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:476) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416) at org.eclipse.equinox.launcher.Main.run(Main.java:1141)
>>We shouldn't call the class KelvinColors I thought people would just interpret it as in "temperature" :) And a nice recognition for Klevin. Its not workbench colours ... all the schemes are, its one particular colour scheme, hence got stuck for name. That said, we can rename it <sniff>. As for the NPE, that's odd, I tested it on both XP and Vista and didn't get. I will investigate but probably need your machine to do so.
Created attachment 63137 [details] Patch with some slight cleanup I've update the patch with some slight cleanup and catching one possible error case of a malformed xml but that's not what's occuring. For the failure you reported, the factory would have to leave the tab end color as null and not sure how that can happen from looking at the code. Was there anything else in your log? Were there other changes in the workspace that might explain how my results are different?
Patch released for build >20070309
I've verified in I0501 against all the XP themes and Vista that we are getting what the mockup attachment 1 [details] shows. Kelvin, can you please verify GTK? I just checked on a GTK box that was running "blue curve" (?) which I thought was the default and I am not getting your mockup.
Verified OS X
Created attachment 65989 [details] GTK verification Looks good here in GTK.