colors
What are the default color values for the Holo theme on Android 4.0?
If you want the default colors of Android ICS, you just have to go to your Android SDK and look for this path: platforms\android-15\data\res\values\colors.xml. Here you go: <!– For holo theme –> <drawable name=”screen_background_holo_light”>#fff3f3f3</drawable> <drawable name=”screen_background_holo_dark”>#ff000000</drawable> <color name=”background_holo_dark”>#ff000000</color> <color name=”background_holo_light”>#fff3f3f3</color> <color name=”bright_foreground_holo_dark”>@android:color/background_holo_light</color> <color name=”bright_foreground_holo_light”>@android:color/background_holo_dark</color> <color name=”bright_foreground_disabled_holo_dark”>#ff4c4c4c</color> <color name=”bright_foreground_disabled_holo_light”>#ffb2b2b2</color> <color name=”bright_foreground_inverse_holo_dark”>@android:color/bright_foreground_holo_light</color> <color name=”bright_foreground_inverse_holo_light”>@android:color/bright_foreground_holo_dark</color> <color name=”dim_foreground_holo_dark”>#bebebe</color> <color … Read more
Android text view color doesn’t change when disabled
I think what’s happening is that since you’re overriding the default textcolor it isn’t inheriting the other textcolor styles. Try creating a ColorStateList for it and setting the textColor attribute to it instead of to a color. In a color file (eg res/color/example.xml): <?xml version=”1.0″ encoding=”utf-8″?> <selector xmlns:android=”http://schemas.android.com/apk/res/android”> <item android:state_enabled=”false” android:color=”@color/disabled_color” /> <item android:color=”@color/normal_color”/> </selector> … Read more
Hex colors in Android are sometimes eight digits. How? What is the difference between #FFFFFF and #FFFFFF00?
The extra two digits are used to define the colors’ transparency, or alpha channel. Android uses the ARGB format (or AARRGGBB as you use in your example). For more (Android-specific) information, take a look at the Color documentation.
Generate distinctly different RGB colors in graphs
You have three colour channels 0 to 255 R, G and B. First go through 0, 0, 255 0, 255, 0 255, 0, 0 Then go through 0, 255, 255 255, 0, 255 255, 255, 0 Then divide by 2 => 128 and start again: 0, 0, 128 0, 128, 0 128, 0, 0 0, … Read more
How to check if hex color is “too black”?
You have to extract the three RGB components individually, and then use a standard formula to convert the resulting RGB values into their perceived brightness. Assuming a six character colour: var c = c.substring(1); // strip # var rgb = parseInt(c, 16); // convert rrggbb to decimal var r = (rgb >> 16) & 0xff; … Read more
How to highlight and color gdb output during interactive debugging?
.gdbinit You can tweak your ~/.gdbinit to have colors. You can use mammon’s .gdbinit which is available here: https://github.com/gdbinit/gdbinit You can tweak it as much as you want too. I found this thanks to this SO answer. Here’s the kind of output that you can obtain: A GitHub repository is also available: https://github.com/gdbinit/Gdbinit On a … Read more
How to change the foreground or background colour of a selected cell in tkinter treeview?
@BryanOkley shared that one cannot change the color of an individual cell in ttk.Treeview. So I explored using tk.Canvas() and tk.Canvas.create_text() to create the illusion of changing the color of a selected cell in a ttk.Treeview() widget. I was fortunate to come by j08lue/ttkcalendar.py which had the same objective and I adapted from it. My … Read more
Compare two Color objects
Always read the documentation first: “To compare colors based solely on their ARGB values, you should use the ToArgb method. This is because the Equals and Equality members determine equivalency using more than just the ARGB value of the colors. For example, Black and FromArgb(0,0,0) are not considered equal, since Black is a named color … Read more
Change text color with Javascript?
You set the style per element and not by its content: function init() { document.getElementById(“about”).style.color=”blue”; } With innerHTML you get/set the content of an element. So if you would want to modify your title, innerHTML would be the way to go. In your case, however, you just want to modify a property of the element … Read more