Assign Background Colour to UIView - uiview

I have a colour (42, 61, 68) with HEX Colour # 2A3D44, which I set it in UIView's background colour property in the xib.
I have compared the results with colour meter and it's not what I expected, the colour I got is (32, 47, 51). You can take a look at it yourself here.
Any ideas?
Thanks,
Attiqe

Guys my mistake I didn't selected the Generic RGB from the colour dialog.
-A

Related

Skip a particular color in smart invert mode of accessibility

Is there any way to skip a particular color in whole app when device is in smart invert mode of accessibility?
I don't want the blue color in my app to be inverted. I have am image which have black and blue color text in it. I want the black color text to be inverted but want to skip blue color.
Any help would be appreciated.
P.S -I am familiar with accessibilityIgnoresInvertColors. But this property can be applied on uiview or object but i need to skip a color.
do it inside the appcolor constant file :- you can check UIAccessibilityIsInvertColorsEnabled() if its true then return clear color else reurn the blue color.

how to change the Label/TextField text color Based on background image color in iOS Objective-C?

I'm working on UIImageView with Labels and TextFields.
In my scenario, how can I change the label text color based on background image?
For Example: My Background image white, in that scenario the label text color is black or red except white.
Please help me.
Thanks in Advance.
Just engineering of answers found online:
Calculate average color for your background image:
how to find average color of image
Calculate an inverted color for the found color:
inverting a UIColor
Set label.textColor to a result color

UIView background color set is not what appears

I created a UIView with a set background color. Lets say RGB value 185, 45, 42. For some reason, when I take a screenshot of this view, it is not that color. It is a little bit darker. Is there a reason why UIView would do this?
The UIView background color is set in interface builder like this:
When I run it on the simulator and take a screenshot and use the eye drop tool to determine the color, the numbers that show up are a little bit darker than what I entered. Same with a button.
I have other screens with the same red color and the screenshot I take of those, the red actually comes out correctly. I've been trying to determine what the difference is between those screens, but so far have not seen any. So I was just wondering if anyone would have any knowledge of anything that "could" case such a color change.
A common mistake when setting a color numerically in Interface Builder is to neglect the color space:
Different color spaces will give different colors (visually) for the same RGB values.
When you set RGB color, you should notice that all the three color values range from 0 to 1, so give them a value greater than 1 would never work. Try this:
RGB(185 / 255.0, 45 / 255.0, 42 / 255.0)

How do I make the foreground color of my awesome wm taskbar's selected window transparent?

I'm using Awesome WM v.3.4.15. I've searched all around and only found the suggestion to add two hex digits to the hex color value of the background color of the selected window in theme.lua but after doing that and reloading it only makes it grey.
Does know what I can do to make the background color of the selected window in the top bar transparent?
Awesome/Lua uses RGBA color space, so indeed to make color transparent you need to add two digits after color.
The parameter you need to change is theme.bg_focus if I understood you correctly, to test it set it to white first "#ffffff" and then change the transparency: "#ffffff00". If it's not that try theme.titlebar_bg_focus or theme.tasklist_bd_focus
The two hex digits are the strength of the transparency.
00 - full transparency
FF - no transparency
So you have to set your value to #ffffff00.

iOS: What does tint color actually do?

Suppose a segmented control's tint color is set to RGB(69, 175, 225) but the actually color from color picker range from (top most) RGB(146, 181, 211) to (bottom most) RGB(82, 118, 147).
So how can I expect the actually displayed color of the segmented control. For example, if I want the color of the bottom most point is RGB(69, 175, 225), what is the RGB value should I set?
The tint is a color on which some fancy visual effects (glossy reflections and so on) is applied. iOS applies them to app icons, tab bars, navigation bars and many other things. I think it would be wrong for you to make any assumptions as to what the local color for a given pixel is for a given tint, given these visual effects vary from UIElement to UIElement and probably from one OS version to another.

Resources