Image Colour Reflect UI Background Colour?

Anyone know how Apple manages to make the UI colour the same as the Image or another object colour?

Like overall I think this is a really cool fun effect I'd love to play with this effect some somehow

Heres an example with how the New Safari does it with the page colour but I see it with other Apple apps like the music Player app for example.

  • I probably miss something.

    What is here the other object ? What is the color match in the screen shots ? It is easy to get a color of an object (its background) or find the color of a pixel on screen. So, what is the exact problem you face ?

  • It's not really a problem based but more of like an interest in getting something to work in a project like for example for a project I was thinking about doing is like having the album artwork reflect the same colour onto the background I was just thinking about how it would work I have saw it with a lot of different Apple apps so that's why I was thinking about working on something similar to it. Like iTunes 11 had the artwork would also show a similar to the background. It's basically like extending the user experience to making the colours blend more so the content matches the user experience.

Add a Comment

Answers

Like here also an example of how it pulls the colour into the UI

In the screenshots, I do not see what part of the screen it is. Is it one of your views in a view controller.

If so, just change the view background color.

In the ViewController code:

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        self.view.backgroundColor = UIColor.blue
}

Or do you mean you want to adjust background colors of buttons to match the view background ?

Then do this on the buttons:

if the button has an IBOutlet

Then in viewDidLoad:

    @IBOutlet myButton: UIButton!

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
                myButton.backgroundColor = self.view.backgroundColor 
}