Tag: colors

color balance on the iPhone

I am taking an image, loading it via the screen context, and changing it pixel by pixel. I have a number of different filters that I am applying to the images, but the last thing I need to do is shift the color balance (similar to Photoshop) to make the red more cyan. The code […]

Random color in iOS

I want to make my Navbar a different color each time its loaded. I have placed the following code in my viewDidApear: CGFloat hue = ( arc4random() % 256 / 256.0 ); // 0.0 to 1.0 CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from white […]

Color wheel or color picker in iOS

How can I make a color wheel, color picker, or hue selector in iOS for use on the iPad. Here is an example picture of a color picker similar to what I want. @All Thanks in advance.

How to get Coordinates and PixelColor of TouchPoint in iOS/ObjectiveC

I need to get the Coordinates and PixelColor of a TouchPoint in Objective-C. Is this even possible? If yes I would be very interested in the how-to or any hint in the right direction. Thanx!!!

Change a color in a UIImage

I will like to know how I can change just one color in a image. Like saying: if the color in this pixel is “red” change it to “blue”.

Detect color under mouse (Mac)

i’ve been searching the web for more than hours and didn’t find anything. I want to know how to get the color of the pixel where the mouse pointer currently is. I programmed a console application, so I have no window to overlay or something else. Just more detail: When I build&run the program ( […]

How can I colorize a black/white UIImageView programmatically?

I have a set of black and white images, like below. If I remember correctly, there’s some way to set the blending or masking property of a UIImage to blend it with the background UIView. In this case, I want to change the color of this image to red to signify hit points. How can […]

Taking an RGB color and normalizing it with UIColor on the iPhone

I’m looking for a straight forward way to convert a color from RGB, grabbing it from a tool like Photoshop, then convert it to a UIColor. Since UIColor uses normalized gamut of 0.0 to 1.0 for each color space, I’m not sure how this is done. Thanks for the solution.

Converting UIColor to CGColor in swift

This is the Obj-C code: CGContextSetStrokeColorWithColor(context, [[UIColor lightGrayColor] CGColor]); How do I write it in swift.

Coloration of UIButtons of type UIButtonTypeRoundedRect

I would like the rounded rectangle portion of the subject type of UIButton to be a solid custom color I specify. I understand that . setTitleColor : changes the text color . backgroundColor : changes the color of the four pie-shaped corner pieces behind the rounded rectangle The question is how to change the color […]