here is my code
I set the UinavigationBar Color with R:54 G:146 B:204,but went I run it,the color is incorrect
Can anybody know why?Thank u so much!
This problem is not specific to setBarTintColor, it is the way iOS applies tint color to elements (slightly modifying it).
If you increase contrast in iOS accessibility settings - you will see another color.
The translucency that UINavigationBars got in iOS 7 messes with the rendering of it's tint color. If you want the color you set exactly you have to turn off the translucency by setting it on your root navigation controller (the property isn't available to the appearance proxy) like this: self.navigationController.navigationBar.translucent = NO. See if that fixes your color issue.
Related
I am looking to change the background color of a button in my GUI application to default.After searching online, i saw that
button1.SetBackgroundColour(wx.NullColor) does not seem to work. I am using python 2.7.
Is there any other way I could set it to default color with out using system colors
A little late, but maybe someone else has the same problem.
Did you try
button1.SetBackgroundColour(wx.NullColour)
So, write "Colour" instead of "Color", the non-American writing. This worked for me.
If wx.NullColour doesn't work, a solution is to decode the RGB code for the colour you seek and apply it to your background.
E.g. the background color on my wx GUI is the light grey from Windows, its RGB code is R=240, G=240, B=240 (you can measure this using Paint for instance).
Then this should work:
button1.SetBackgroundColour(wx.Colour(240, 240, 240))
Of course if you want your GUI to be portable on other systems this isn't the best option since this light grey is only the default colour in Windows.
With Python 2.7.17 and wxPython 3.0.2.0 the following seems to work:
button1.SetBackgroundColour('')
I think that the solutions do not work because wxPython works with a style system. I was able to change foreground & background colours with the SetStyle method.
I was styling a wx.TextCtrl where I needed to highlight the text I search for.
First, I stored the existing colours to variables.
bc = self.te.GetBackgroundColour()
fc = self.te.GetForegroundColour()
self.bcol = wx.Colour(bc[0], bc[1], bc[2], bc[3])
self.fcol = wx.Colour(fc[0], fc[1], fc[2], fc[3])
Change the colours with SetStyle
self.te.SetStyle(x, y, wx.TextAttr(wx.BLACK, wx.LIGHT_GREY))
And reset it back to the original colours:
self.te.SetStyle(0, -1, wx.TextAttr(self.fcol, self.bcol))
I have some particular QComboBox like this (osx style):
that I want to highlight programmatically. I used
combo->setStyleSheet("background-color: yellow");
and the background get changed, but then the whole style of my widget becomes ugly like this:
as you can see, the background is ok, but dropdown button got changed with '90 motif style (old good days...)
Is it possible to just change the background?
Some of the stylesheet rules will trigger a fallback to the Windows style, see my answer here.
One option to style the background is by using QProxyStyle.
Changing the palette might also work.
I am trying to set the corner radius for the bottom left and bottom right corners for a WKInterfaceGroup. I was able to set only one single radius value and that would change it for all the corners. I couldn't find a way to access the CALayer to specify it there either.
Is there a way this can be done?
Thanks!
(The group would contain 2 labels and would be in contact with the sash in the dynamic notification interface.)
You asked about WKInterfaceGroup, but from your response to #BalestraPatrick it sounds like you are specifically trying to achieve bottom corner rounding in the long-look notification, correct?
If so, it's a bug in the current beta.
Assuming you can sign in, here's a developer forum describing the bug: https://devforums.apple.com/message/1098796
The gist is: there used to be a boolean on the Category (where sash color is) to offset content (that's what Apple's Documentation is referring to here https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/BasicSupport.html) but they took it out of Beta 5. Now, you are supposed to be able to set the background color of the notification controller itself and it will do the rounding for you. Just doesn't work yet.
I've logged a bug with Apple and had it closed as a "duplicate" - which means it's a bug and they know about it. Feel free to log again - it increases the priority of the bug in their queue :)
I hope this answer is what you're looking for.
After thinking about it for some time, I came up with a solution. There is no solution in code. I think this is how Apple is doing the same effect for the calendar notification view.
You need to make the main group's backgroundColor white. Then in the top group set the background color to some other color (like red in my case). Then add another group with the same background color as the container group.
The result should be like this in the Apple Watch Simulator.
I'm trying to make this zsh theme work: https://gist.github.com/3712874
I've made some small changes to it but there is still one problem. It seems that the right triangle glyph doesn't get the same color as the text background. See this image:
Any ideas why this might happen, and how to fix it?
I made it look pretty good. I had to go change the opacity of my colors. Instead of 100% I had to fiddle a bit and set them around 76-81% depending on what color it was.
I believe I switched to iTerm2 to fix this issue in the end.
Solution
On Linux using Terminal I had to change the Profile Preferences->Colors. For example, I wanted to use the theme dpoggi. I downloaded the theme image, then used the dropper tool to match the "red" "green", "cyan", and "magenta" that are used in the dpoggi source code.
dpoggi theme
Terminal Profile Preferences->Colors
I found that playing with the "Cursor guide" transparency in Preferences > Profiles worked for me. It can also be disabled.
I have a web page which has a picture. That picture has a color.
I need the hex code of the color in that picture. How can I get it?
Get Firefox. Get the ColorZilla plugin. Click on ColorZilla. Move over the color you want. Voila! You have the hexadecimal codes.
Another program to use is ColorPic.
ColorSchemer ColorPix is another good option. Light weight, and it gives you (among others) the RGB as well as the Hex for a given color.
The Internet Explorer developer toolbar (F12 in Internet Explorer 8) has a colour picker in the Tools menu that should help you.
Firefox has a few add-ons available that do the same thing.
If you want to do this in software, rather than manually, you could use a canvas element in supported browsers - draw the image on the canvas, then extract the colour information of the desired pixel. See this related question for how.
You can try Pixie from Nattyware. That is free and they also have a portable version.
Take a screenshot and open it in a regular or sophisticated paint application to get the color. Or better: download the picture and open it in a paint application.
Take a screenshot of the page, open it in Adobe Photoshop and select that color with the dropper tool.
The Color dialog will show you the hexadecimal code, the RGB color and the CYMK color code for that. You can do the same in GIMP if you don’t have Photoshop.