Trending February 2024 # Tutorial: Unlock Iphone 3.1.2 With Blacksn0W # Suggested March 2024 # Top 7 Popular

You are reading the article Tutorial: Unlock Iphone 3.1.2 With Blacksn0W updated in February 2024 on the website Kientrucdochoi.com. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested March 2024 Tutorial: Unlock Iphone 3.1.2 With Blacksn0W

It’s official, BlackSn0w is out and available for download. BlackSn0w is not a standalone app. BlackSn0w is part of  Blackra1n RC3.

People who accidentally locked their iPhone on baseband 05.11.07 will now be able to unlock their iPhone using BlackSn0w.

This step by step guide and tutorial will show you how to unlock your iPhone OS 3.1.2 baseband 05.11.07 with BlackSn0w.

If you just want to jailbreak your iPhone and are not interested in unlocking, refer to my BlackRa1n RC3 tutorial.

This BlackSn0w iPhone unlock tutorial will work on both Mac and PC.

In this tutorial, I will assume that your iPhone is currently not jailbroken or unlocked.

If you are a loyal blackra1n user who kept the chúng tôi on your iPhone, run it. You will see Icy replaced by an option “ra1n”. Install this to upgrade your app. After upgrading, run chúng tôi again. You will see “sn0w”. Install this, and enjoy your unlocked iPhone.

If you jailbroke using pwnage or deleted your chúng tôi you are in luck too. Sometime later in the sn0wday, blacksn0w will be added to Cydia.

How to unlock iPhone firmware 3.1.2 with BlackSn0w:

Step 1: Update iTunes to the latest version available and reboot your computer. Make sure your iPhone runs the latest firmware 3.1.2. If not, update your iPhone to OS 3.1.2 and set it as a new phone (do not restore and set up from backup).

Step 4: Your iPhone will enter recovery mode and you will see the usual recovery image replaced by a picture of GeoHot.

Step 5: BlackRa1n will run on your iPhone and it will reboot when done.

Step 6: A message will show up asking to donate. If your jailbreak is successful, I think it’s the right thing to do to donate $5 or more. It’s a good way to keep GeoHot motivated.

Step 7: After your iPhone has rebooted, you will notice a new BlackRa1n icon on your springboard. Make sure you have an internet connection and launch chúng tôi on your iPhone.

Step 8: You will now have the option to install Cydia, Rock, or both if you choose to. More importantly, you can also select “sn0w” which is the iPhone unlock for iPhone 3G and 3GS. Select at least Cydia and sn0w, then tap “install”. If you want to unlock an iPhone 2G, DO NOT install BlackSn0w. Simply install Cydia and skip to step 12.

Step 9: Once the packages are installed, your iPhone will respring and you should see Cydia (and Rock if you chose it) on your springboard.

Step 10: Once Cydia and/or Rock, and BlackSn0w are installed on your springboard, you can now uninstall BlackRa1n from your iPhone. Uninstalling BlackRa1n will obviously not remove the jailbreak and unlock. It will simply remove the chúng tôi that was used to install the packages. To do so, simply launch the chúng tôi and select “uninstall BlackRa1n”.

Step 11: After uninstalling BlackRa1n, I suggest you reboot your iPhone.

Step 12: This step is ONLY for iPhone 2G users who want to unlock. I repeat, if you have an iPhone 3G or 3GS, DO NOT process with this step. Launch Cydia and search for the BootNeuter app. Download and install it. Launch the BootNeuter app and tweak the settings as the image below.

When all the settings are set correctly, tap the “Flash” button. Now wait. It could take a while so be patient. Under no circumstance should you abort the process.

Done!

The whole process shouldn’t take more than 10 minutes (more for iPhone 2G that needs to be flashed). It definitely is an easy jailbreak and unlock.

UPDATE: Having problems after running BlackSn0w (ie. no wifi, no 3G, no push)? Please see this article for a fix.

You're reading Tutorial: Unlock Iphone 3.1.2 With Blacksn0W

What Is Functional Programming? Tutorial With Example

What is Functional Programming?

Functional programming (also called FP) is a way of thinking about software construction by creating pure functions. It avoid concepts of shared state, mutable data observed in Object Oriented Programming.

Functional langauges empazies on expressions and declarations rather than execution of statements. Therefore, unlike other procedures which depend on a local or global state, value output in FP depends only on the arguments passed to the function.

In this tutorial, you will learn-

Characteristics of Functional Programming

Functional programming method focuses on results, not the process

Emphasis is on what is to be computed

Data is immutable

Functional programming Decompose the problem into ‘functions

It is built on the concept of mathematical functions which uses conditional expressions and recursion to do perform the calculation

It does not support iteration like loop statements and conditional statements like If-Else

History of Functional programming

The foundation for Functional Programming is Lambda Calculus. It was developed in the 1930s for the functional application, definition, and recursion

LISP was the first functional programming language. McCarthy designed it in 1960

In the late 70’s researchers at the University of Edinburgh defined the ML(Meta Language)

In the early 80’s Hope language adds algebraic data types for recursion and equational reasoning

In the year 2004 Innovation of Functional language ‘Scala.’

Functional Programming Languages

The objective of any FP language is to mimic the mathematical functions. However, the basic process of computation is different in functional programming.

Here, are some most prominent Functional programming languages:

Haskell

SML

Clojure

Scala

Erlang

Clean

F#

ML/OCaml Lisp / Scheme

XSLT

SQL

Mathematica

Basic Functional Programming Terminology and Concepts

Immutable Data

Immutable Data means that you should easily able to create data structures instead of modifying ones which is already exist.

Referential transparency

Functional programs should perform operations just like as if it is for the first time. So, you will know what may or may not have happened during the program’s execution, and its side effects. In FP term it is called Referential transparency.

Modularity Maintainability

Maintainability is a simple term which means FP programming is easier to maintain as you don’t need to worry about accidentally changing anything outside the given function.

First-class function

‘First-class function’ is a definition, attributed to programming language entities that have no restriction on their use. Therefore, first-class functions can appear anywhere in the program.

Closure

The closure is an inner function which can access variables of parent function’s, even after the parent function has executed.

Higher-order functions

Higher-order functions either take other functions as arguments or return them as results.

Higher-order functions allow partial applications or currying. This technique applies a function to its arguments one at a time, as each application returning a new function which accepts the next argument.

Pure function

A ‘Pure function’ is a function whose inputs are declared as inputs and none of them should be hidden. The outputs are also declared as outputs.

Pure functions act on their parameters. It is not efficient if not returning anything. Moreover, it offers the same output for the given parameters

Example:

Function Pure(a,b) { return a+b; } Impure functions

Impure functions exactly in the opposite of pure. They have hidden inputs or output; it is called impure. Impure functions cannot be used or tested in isolation as they have dependencies.

Example

int z; function notPure(){ z = z+10; } Function Composition

Function composition is combining 2 or more functions to make a new one.

Shared States

Shared states is an importance concept in OOP programming. Basically, It’s adding properties to objects. For example, if a HardDisk is an Object, Storage Capacity and Disk Size can be added as properties.

Side Effects

Side effects are any state changes which occur outside of a called function. The biggest goal of any FP programming language is to minimize side effects, by separating them from the rest of the software code. In FP programming It is vital to take away side effects from the rest of your programming logic.

The benefits of functional programming

Allows you to avoid confusing problems and errors in the code

Easier to test and execute Unit testing and debug FP Code.

Parallel processing and concurrency

Hot code deployment and fault tolerance

Offers better modularity with a shorter code

Increased productivity of the developer

Supports Nested Functions

Functional Constructs like Lazy Map & Lists, etc.

Allows effective use of Lambda Calculus

Limitations of Functional Programming

Functional programming paradigm is not easy, so it is difficult to understand for the beginner

Hard to maintain as many objects evolve during the coding

Needs lots of mocking and extensive environmental setup

Re-use is very complicated and needs constantly refactoring

Objects may not represent the problem correctly

Functional Programming vs. Object-oriented Programming

Functional Programming OOP

FP uses Immutable data. OOP uses Mutable data.

Follows Declarative Programming based Model. Follows Imperative Programming Model.

What it focuses is on: “What you are doing. in the programme.” What it focuses is on “How you are doing your programming.”

Supports Parallel Programming. No supports for Parallel Programming.

Its functions have no-side effects. Method can produce many side effects.

Flow Control is performed using function calls & function calls with recursion. Flow control process is conducted using loops and conditional statements.

Execution order of statements is not very important. Execution order of statements is important.

Supports both “Abstraction over Data” and “Abstraction over Behavior.” Supports only “Abstraction over Data”.

Conclusion

Functional programming or FP is a way of thinking about software construction based on some fundamental defining principles

Functional programming concepts focuses on results, not the process

The objective of any FP language is to mimic the mathematical functions

Some most prominent Functional programming languages: 1)Haskell 2)SM 3) Clojure 4) Scala 5) Erlang 6) Clean

A ‘Pure function’ is a function whose inputs are declared as inputs and none of them should be hidden. The outputs are also declared as outputs.

Immutable Data means that you should easily able to create data structures instead of modifying ones which is already exist

Allows you to avoid confusing problems and errors in the code

Functional code is not easy, so it is difficult to understand for the beginner

FP uses Immutable data while OOP uses Mutable data

Jasmine Framework Tutorial: Unit Testing With Example

What is JasmineJS?

Jasmine is an open-source and most popular JavaScript library testing framework to test any kind of JavaScript application. Jasmine follows Behavior Driven Development (BDD) procedure to ensure that each line of JavaScript statement is properly unit tested.

What is the Jasmine Framework Used for?

Testing is a key element to any application. For NodeJS unit testing, the framework available for Testing is called Jasmine. In early 2000, there was a framework for testing JavaScript applications called JsUnit. Later this framework got upgraded and is now known as Jasmine.

Jasmine helps in automated Unit Testing, something which has become quite a key practice when developing and deploying modern-day web applications.

In this Jasmine tutorial, you will learn how to get your environment setup with Jasmine and how to run Jasmine tests for your first chúng tôi application.

In this Jasmine testing tutorial, you will learn-

Jasmine for testing chúng tôi applications

Jasmine is a Behavior Driven Development(BDD) testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus, it’s suited for websites, chúng tôi projects, or anywhere that JavaScript can run. To start using Jasmine, you need to first download and install the necessary Jasmine modules.

How to Setup Jasmine Test Environment

Next in this Jasmine Node JS tutorial, you would need to initialize your environment and inspect the jasmine configuration file. The below steps shows how to setup Jasmine in your environment

You need to install jasmine module to use the jasmine framework from within a Node application. To install the jasmine-node module, run the below command.

npm install jasmine-node

Initializing the project – By doing this, jasmine creates a spec directory and configuration json for you. The spec directory is used to store all your test files. By doing this, jasmine will know where all your tests are, and then can execute them accordingly. The JSON file is used to store specific configuration information about jasmine.

To initialize the jasmine environment, run the below command

jasmine init

The configuration file will be stored in the spec/support folder as jasmine.json. This file enumerates the source files and spec files you would like the Jasmine runner to include.

The below screenshot shows a typical example of the chúng tôi file for jasmine.

Note that the spec directory is specified here. As noted earlier, when jasmine runs, it searches for all tests in this directory.

The next thing to note is the spec_files parameter – This denotes that whatever test files are created they should be appended with the ‘spec’ keyword.

Next in this Jasmine framework tutorial, we will learn how to use Jasmine to test chúng tôi applications.

How to use Jasmine to test chúng tôi applications

In order to use Jasmine unit testing for chúng tôi applications, a series of steps need to be followed.

In our example below, we are going to define a module which adds 2 numbers which need to be tested. We will then define a separate code file with the test code and then use jasmine to test the Add function accordingly.

Step 1) Define the code which needs to be tested. We are going to define a function which will add 2 numbers and return the result. This code is going to be written in a file called “Add.js.”

var exports=module.exports={}; exports.AddNumber=function(a,b) { return a+b; }; Code Explanation:

The “exports” keyword is used to ensure that the functionality defined in this file can actually be accessed by other files.

We are then defining a function called ‘AddNumber.’ This function is defined to take 2 parameters, a and b. The function is added to the module “exports” to make the function as a public function that can be accessed by other application modules.

We are finally making our function return the added value of the parameters.

Step 2) Next, we need to define our jasmine test code, which will be used to test our “Add” function In the chúng tôi file. The below code needs to put in a file called add-spec.js.

Note: – The word ‘spec’ needs to be added to the test file so that it can be detected by jasmine.

Code Explanation: var app=require("../Add.js"); describe("Addition",function(){ it("The function should add 2 numbers",function() { var value=app.AddNumber(5,6); expect(value).toBe(11); }); });

We need to first include our chúng tôi file so that we can test the ‘AddNumber’ function in this file.

We are now creating our test module. The first part of the test module is to describe a method which basically gives a name for our test. In this case, the name of our test is “Addition”.

The next bit is to give a description for our test using the ‘it’ method.

We now invoke our Addnumber method and send in 2 parameters 5 and 6. This will be passed to our Addnumber method in the chúng tôi file. The return value is then stored in a variable called value.

The final step is to do the comparison or our actual test. Since we expect the value returned by the Addnumber function to be 11, we define this using the method expect(value).toBe(the expected value).

Output

In order to run the test, one needs to run the command jasmine.

The below screenshot shows that after the jasmine command is run , it will detect that there is a test called chúng tôi and execute that test accordingly. If there are any errors in the test, it will be shown accordingly.

Summary

In order to test a chúng tôi application, the jasmine framework needs to be installed first. This is done by using the Node package manager.

The test code needs to be written in a separate file, and the word ‘spec’ should be appended to the file name. Only if this is done will jasmine be able to detect that a file needs to be run.

To run the test, you need to execute the jasmine command. This will find all files which have the ‘spec’ word attached to it and run the file accordingly.

Unlock With Apple Watch Not Working? 15 Solutions To Fix It

Your Apple Watch can automatically unlock your iPhone, which removes the need to enter the iPhone passcode or use Face ID. However, if Apple Watch is not unlocking iPhone, you see errors like “Unable to Communicate with Apple Watch,” or you’ll stay stuck on the iPhone passcode screen for a few seconds.

This guide lists 15 solutions to fix the issue of Unlock with Apple Watch not working between your watch and iPhone.

1. Compatible devices and software versions

You can unlock your iPhone with your Apple Watch if you have:

An iPhone with Face ID running iOS 14.5 or later. This means iPhones with Touch ID Home button aren’t supported.

An Apple Watch Series 3 or later running watchOS 7.4 or later.

Pro Tip: On iPhone 12 or later, you can ignore Unlock with Apple Watch and set up your iPhone to unlock with Face ID even when wearing a mask!

iPhone 13 running iOS 15 have a bug where Apple Watch would fail to unlock the device and show an error saying “Unable to Communicate with Apple Watch.” Apple acknowledged the problem and fixed it in iOS 15.0.1.

3. Unlock iPhone with Apple Watch works only with mask or sunglasses

Your Apple Watch can unlock your Mac anytime. However, for Apple Watch to unlock your iPhone, your mouth and nose must be obstructed with something like a mask, or your eyes must be blocked by sunglasses or a similar thing like ski goggles. So, if you hope your Apple Watch to unlock your iPhone kept on a table (away from your face), it won’t work.

4. Make sure you’re wearing your unlocked Apple Watch

You must wear the Apple Watch on your wrist. It can’t be left on a table. Then only your iPhone will auto-unlock with the Apple Watch.

Next, do you see a tiny lock icon on the top of the Apple Watch screen? If yes, that means your Apple Watch is locked by a passcode. Simply press the Digital Crown and enter your Apple Watch passcode to unlock it. Now, Unlock with Apple Watch should work successfully.

Note: Apple Watch locks itself automatically when you take it off your wrist. You’ll have to enter the passcode once again after wearing it.

5. Enable Wi-Fi and Bluetooth on both devices

When Wi-Fi and Bluetooth are enabled on both devices, your Apple Watch can unlock your iPhone by establishing a secure connection. Thus, if your iPhone fails to unlock via the Apple Watch, go to iPhone Settings or Control Center and enable Wi-Fi and Bluetooth. It’s ok if iPhone isn’t connected to any Wi-Fi network or you tap the Wi-Fi icon in the Control Center to stop it from searching for new networks (i.e., the blue Wi-Fi icon becomes white).

Follow these steps to check Wi-Fi and Bluetooth settings on your Apple Watch:

Press the Digital Crown to see all apps and tap Settings.

Tap Wi-Fi and make sure it’s on.

Go back and tap Bluetooth and ensure it’s on.

6. Connect your iPhone and Apple Watch

Once you enable Bluetooth (and Wi-Fi) on your iPhone and Apple Watch, they connect automatically. To check, swipe up from the bottom of the Apple Watch screen to open its Control Center. Here if you see a tiny green iPhone icon, that means your Apple Watch is connected to your iPhone. If you see a red iPhone icon, double-check Wi-Fi and Bluetooth. Turning them off and back on will also help.

Must read: How to know whether your Apple Watch is connected to the internet or not

7. You’ll have to enter the passcode once

Your iPhone will ask you to manually enter the iPhone passcode after restarting it or unlocking the Apple Watch. Once you enter the passcode, Unlock with Apple Watch will work for all future unlocking attempts.

8. Enable and disable Airplane Mode

Turning on and off Airplane Mode disconnects radio signals like Wi-Fi and Bluetooth. This little trick refreshes the wireless protocols, usually fixing communication problems.

On iPhone:

Open Control Center by swiping down from the top right of the screen where the battery icon is.

Tap the airplane icon, and it’ll turn yellow.

After waiting for 15 seconds, tap the same icon to turn off Airplane Mode.

On Apple Watch:

Swipe up from the bottom of the watch face to open Control Center.

Tap the airplane icon, and it’ll turn yellow.

After 15 seconds, tap the same icon to turn off Airplane Mode.

9. Restart both devices

If you haven’t restarted your iPhone or Apple Watch in a long time, temporary glitches may cause such inconveniences. To fix this, turn off both devices, wait for a minute, and turn them back on. After that, manually enter the passcode once on your iPhone and Apple Watch. Your Apple Watch should unlock your iPhone automatically from now on.

10. Disable and re-enable Unlock with Apple Watch

If your Apple Watch isn’t unlocking your iPhone even after fulfilling the above requirements, follow these steps to turn off this feature and turn it back on.

Here’s how to fix iPhone not unlocking with Apple Watch:

Open iPhone Settings and tap Face ID & Passcode.

Turn off Unlock with Apple Watch.

Restart your iPhone.

Go to iPhone Settings, tap Face ID & Passcode, and enable Unlock with Apple Watch once again.

11. Turn on passcode and wrist detection on Apple Watch

Your Apple Watch can unlock your iPhone only when you have set up a passcode on it and enabled wrist detection. The following steps will help confirm that:

Open the Watch app on your iPhone and tap Passcode from the My Watch section.

In case you have not set up a passcode, tap Turn Passcode On and do that.

If it says Turn Passcode Off and Change Passcode, that means you have already fulfilled the condition. From the bottom, also make sure Wrist Detection is enabled. After that, tap Turn Passcode Off and enter the passcode on your Apple Watch to disable it. Next, tap Turn Passcode On and set it up again.

Tip: Some users have found success by turning off Unlock with iPhone.

Related: Unable to install update on Apple Watch? Here’s how to fix it

13. Reset iPhone Face ID

Here’s how to do that:

Open iPhone Settings and tap Face ID & Passcode.

Tap Reset Face ID.

Related: Setting up an alternate appearance using Face ID

14. Reset iPhone network settings

Apple Watch communicates with your iPhone via Wi-Fi and Bluetooth to unlock it. If none of the above solutions fix the issue, reset your iPhone network settings.

15. Unpair and re-pair your Apple Watch

Are things still not in order? Unpair your Apple Watch and pair it again. This will make a backup of your Apple Watch and then erase it. After that, set up your Apple Watch again, and it should fix the ongoing issues related to unlocking your iPhone.

Check out next:

How To Unlock The Bootloader On T

One reason OnePlus phones keep getting popular beside the clean software and timely updates is the impressive support they get from the development community. Not much has changed with the latest OnePlus 7 Pro apart from the fact that it also has a carrier-variant that makes the process a little longer than usual, but nothing is impossible.

In this article, we will show you how to unlock the bootloader of your T-Mobile OnePlus 7 Pro.

Related:

How to unlock T-Mobile OnePlus 7 Pro bootloader

Generally, it has always been a downhill task when it comes to unlocking the bootloader of OnePlus devices. However, since the T-Mobile OnePlus 7 Pro is network-locked, it must first be freed from the Magenta carrier’s chains before the bootloader is unlocked.

Note: Make sure you have taken a backup of all important files, documents, photos, videos, and everything else your device will be wiped during the process.

1. SIM unlock your OnePlus 7 Pro

T-Mobile allows users to SIM unlock their OnePlus 7 Pro phones but only after the device is paid in full. Also, you must have used the phone on the carrier’s network for 40 continuous days before an unlock code is issued to you.

As long as your device meets all the below requirements as set by T-Mobile, go ahead and contact their customer service to request the unlock code and guide on how to SIM unlock your phone.

Device eligibility is determined as follows:

The device must be a T-Mobile device.

The device must not be reported as lost, stolen or blocked to T-Mobile.

The account associated with the device must be in good standing.

You have requested no more than two device unlock codes per line of service in the last 12 months.

The device must satisfy all the Postpaid or Prepaid Unlocking terms outlined below.

Unlock eligibility for monthly phones:

The device must have been active on the T‑Mobile network for at least 40 days on the requesting line.

If the device was financed using T‑Mobile’s Equipment Installment Plan (EIP), then all payments must be satisfied and the device must be paid in full unless otherwise specified.

If the device is on an account that has a service contract term, then at least 18 consecutive monthly payments must have been made or the account was migrated to a no-contract rate plan.

If the device is associated with a canceled account, then the account balance must be zero.

T‑Mobile may request proof of purchase or additional information in its discretion and certain other exceptions may apply.

Unlock eligibility for prepaid phones:

The device has been active on the T‑Mobile network for more than 1 year.

If the device has been active for less than 1 year, then the Prepaid account associated with the device must have had more than $100 in refills since the device’s first use date.

T‑Mobile may request proof of purchase or additional information in its discretion and certain other exceptions may apply.

2. Enable OEM unlocking

Once your OnePlus 7 Pro is SIM unlocked, it’s time to enable OEM unlocking in the settings menu.

Enable developer options first.

Open the Settings app.

Scroll down and tap on About phone.

Tap on Build number multiple times until you get a notification that you’re now a developer. (You may need to provide the security password first.)

Tap on the back button to go back to the main screen of the Settings app.

Tap on System.

Tap on Developer options.

Scroll down a little and tap on OEM Unlocking to enable it.

3. Get IMEI number

You also need the IMEI number of your OnePlus 7 Pro. To get it, open the Phone app and then dial *#06#, which a standard for all Android devices.

Note down the IMEI somewhere. You will need to use it below.

4. Enter fastboot mode to get unlock code

The next step is to boot your phone into fastboot mode. To do this, follow the steps below:

Boot your OnePlus 7 Pro into Fastboot mode. Here’s how:

Power off your OnePlus 7 Pro. Wait for 4-5 seconds after the screen goes black.

Press and hold Volume up + Volume down + Power buttons together until you see anyting on the screen.

Your device will soon enter the fastboot mode.

Connect the OnePlus 7 Pro to your computer via USB.

Open a command prompt window in the root directory. Here’s how: With the root directory open, type cmd in its address bar and then hit the enter key.

5. Provide IMEI and unlock code to T-Mobile to receive unlock token

In order for OnePlus to send you the token to unlock your OnePlus 7 Pro bootloader, you must provide the device IMEI and the unlock code obtained in the steps above.

Fill in the details asked on the page.

Wait until T-Mobile sends you the unlock token to your email address. They will send you a file called unlock_token.bin as an attachment to the email.

Once you get the email, download the unlock_token.bin file on your PC and move to the next step.

Related → How to unbrick a dead OnePlus 7 Pro

7. Unlock your T-Mobile OnePlus 7 Pro

Now we unlock the device. Here’s how:

Make sure the device is the Fastboot mode.

Copy the unlock_token.bin file from T-Mobile into the root directory.

fastboot flash cust-unlock unlock_token.bin

fastboot oem unlock

The device will reboot now. It will show you the secure boot warning, boot into recovery mode, and delete everything on the device.

When done, the T-Mobile OnePlus 7 Pro reboot into Android OS automatically. And it is now unlocked.

Done!

That was a pretty lengthy procedure. Hope you were able to do this all successfully, easily.

Let us know of your experience with this whole thing of unlocking the bootloader on T-Mobile OnePlus 7 Pro.

Related:

Photoshop Color Replacement Tool Tutorial

Photoshop Color Replacement Tool Tutorial

Written by Steve Patterson.

In a previous tutorial, we looked at the Background Eraser and why it’s one of the best tools in Photoshop for removing unwanted areas of an image. In this tutorial, we’ll learn all about the Color Replacement Tool and how it enables us to change the color of an object in a photo without a lot of fuss or hassle.

You may be wondering what on earth a tool for erasing backgrounds has to do with a tool for changing colors, and the answer is, a lot! Both of these tools use the exact same technology for detecting the pixels in the image that need to be changed. The only difference is that one of them deletes pixels entirely, the other simply changes their color. In fact, they’re so similar that if you’ve already read through the Background Eraser tutorial and understand how its various options work, learning about the Color Replacement Tool will seem a lot like déjà vu.

This tutorial is for Photoshop CS5 and earlier. If you’re using Photoshop CS6 or Photoshop CC, you’ll want to check out our fully updated Color Replacement Tool tutorial.

Selecting The Color Replacement Tool

In Photoshop CS3 and CS4, the Color Replacement Tool is nested under the Brush Tool. In CS and CS2, it’s under the Healing Brush.

With the Color Replacement Tool selected, your mouse cursor will change into a circle with a small target symbol in the center of it. As I mentioned, if you’re familiar with the Background Eraser, this will look very familiar to you since both tools use the exact same cursor:

The Color Replacement Tool’s cursor is made up of a simple circle with a target symbol in the middle, just like the Background Eraser.

You can adjust the size of the circle directly from your keyboard using the bracket keys, which are found to the right of the letter P on most keyboards. Press the left bracket key ( [ ) to make the circle smaller or the right bracket key ( ] ) to make it larger. To change the hardness of the brush edges, just add the Shift key. Press Shift+left bracket ( [ ) to make the edges softer or Shift+right bracket ( ] ) to make them harder.

How The Color Replacement Tool Works

As you drag the Color Replacement Tool over your image, Photoshop continuously samples the color that’s directly under the target symbol in the center of the tool’s cursor. This is the color that will be replaced, and it will be replaced with your current Foreground color. Any pixels that fall within the larger circle surrounding the target symbol that match the color being replaced will have their color changed. For example, if you pass the target symbol over an area of blue in your photo and your Foreground color is set to red, any blue pixels that the larger circle passes over will be changed to red. There’s some options we can set in the Options Bar to alter the behavior of the tool (which we’ll look at shortly), but essentially, that’s how it works.

You can see what your Foreground color is currently set to by looking at the Foreground color swatch near the bottom of the Tools palette. By default, it’s set to black:

Black is the default Foreground color, but it’s probably not the color you’ll want to use.

Use the Color Picker to choose a new Foreground color.

If I look again in my Tools palette, I see that the Foreground color swatch has changed to the new color. If I paint on an image with the Color Replacement Tool at this point, whichever color I drag the target symbol over will be replaced with green:

The newly chosen color appears in the color swatch.

As an example, here’s a photo of a young girl holding a balloon:

The girl looks happy, but the balloon looks blue.

Photoshop samples the blue color and replaces all blue pixels within the circle with green.

To change the rest of the balloon to green, I just need to keep my mouse button held down and continue dragging the Color Replacement Tool over the remaining blue areas. As long as I keep the target symbol over the blue balloon and don’t stray off into other areas of the image, which would cause Photoshop to sample a different color, only the blue color will be replaced with green:

Keeping the target symbol over the blue area as I paint.

If I accidentally move the target symbol outside of the balloon and over the yellow wall behind it, Photoshop samples the color of the wall and begins changing it to green as well:

By moving the target symbol outside of the balloon, Photoshop starts replacing other colors with green.

If this happens, simply undo the last step by pressing Ctrl+Z (Win) / Command+Z (Mac), or undo multiple steps by pressing Ctrl+Alt+Z (Win) / Command+Option+Z (Mac) as many times as needed, then continue on.

Tolerance

Everything seems to be going smoothly as I paint over the balloon until I get to the edges. If you look closely, you can see some faint blue fringing that the Color Replacement Tool is having trouble with:

Some of the original blue color remains along the edges of the balloon.

I mentioned a few moments ago that there are several options available to us in the Options Bar for altering the behavior of the Color Replacement Tool, and one of these options is Tolerance. The Tolerance setting determines how different a color can be from the sampled color for Photoshop to replace it with the Foreground color. The default value is 30%, which is a good starting point. Unfortunately, it’s not quite high enough in this case for Photoshop to be able to include the shade of blue right along the edges of the balloon.

I’ll increase my Tolerance value to 50%, which will allow the Color Replacement Tool to affect a wider range of colors:

Increasing the Tolerance setting in the Options Bar.

With a higher Tolerance value entered, I’ll undo my last step and try again. This time, as I move along the edge of the balloon, the Color Replacement Tool is able to remove the blue fringing:

The blue along the edge of the balloon has been successfully changed to green.

I’ll finish painting over the remaining areas as our once blue balloon is magically transformed into green thanks to the Color Replacement Tool and a little boost in the Tolerance value:

The Color Replacement Tool was able to change the balloon’s color with little effort.

The sampled color appears in the Foreground color swatch.

With the color sampled directly from the image, I can paint over the balloon once again with the Color Replacement Tool to change its color:

The green balloon, originally blue, is now red.

Notice that even though we’ve essentially painted a color over top of the balloon, it retained its shiny, reflective appearance. If we had simply grabbed the regular Brush Tool and painted over it, the balloon would look like nothing more than a flat surface with no life to it. So how was the Color Replacement Tool able to keep the balloon’s texture and reflections? For the answer to that, we need to look at more of the options in the Options Bar, which we’ll do next!

The Blend Modes

The reason the Color Replacement Tool is able to paint a new color over an object or an area of a photo without losing the texture detail is because it uses blend modes to blend the new color in with the image. There’s four blend modes to choose from (Hue, Saturation, Color, and Luminosity), all of which can be selected from the Mode option in the Options Bar. The default blend mode is Color:

The Mode option allows us to change the blend mode for the Color Replacement Tool.

If you’ve ever taken a Color Theory 101 class, you probably know that what most of us think of as the color of an object is really a combination of three things – hue, saturation and brightness. Each of the four blend modes we can select for the Color Replacement Tool will change which of these three aspects of the original color will be affected.

Hue: The Hue blend mode will change only the basic color itself. It will not change the saturation or brightness of the original color. This mode is useful for images where the colors are not very intense and will usually produce very subtle changes.

Saturation: The Saturation blend mode changes only the saturation of the original color. The hue and brightness are not affected. This is useful for reducing the intensity of a color, or even removing color completely.

Color: Color is the default blend mode and will change both the hue and saturation. The brightness will remain unchanged. This is the blend mode you’ll use most often.

Luminosity: Finally, the Luminosity blend mode will simply match the brightness of the original color to the brightness of the new color. Hue and saturation are unaffected.

The original image.

One way to make the balloon stand out even more from the others in the image might be to reduce the color saturation of some of the other balloons below it. I don’t want to change the actual color of the balloons, just the intensity of them. To do that, with the Color Replacement Tool selected, I’ll change my blend mode option in the Options Bar to Saturation:

Changing the blend mode to Saturation.

Sampling one of the less saturated colors in the image.

With a less saturated color now set as my Foreground color and my blend mode set to Saturation, I’ll simply paint over any balloons that need their saturation level reduced, adjusting my brush size with the left and right bracket keys on the keyboard and changing the Tolerance value in the Options Bar as needed. Here, we can see the difference in color saturation as I paint over one of the other orange balloons:

Reducing the color saturation of one of the balloons by painting over it in Saturation mode.

I’ll continue painting over any other balloons that need their color saturation reduced. Here’s the completed result:

The orange balloon floating above the others now stands out even more thanks to its higher color saturation.

The Brightness Problem

There’s one situation, unfortunately, where the Color Replacement Tool tends to fail miserably, and that’s when there’s a big difference in brightness between the original color in the image and the color you want to replace it with. Let’s say I wanted to replace the orange in that one balloon we’ve been focusing on with the dark purple color from one of the other balloons. From everything we’ve seen so far, it should be simple enough, right?

Sampling a purple color to set as my Foreground color.

I’ll set my blend mode in the Options Bar back to Color, the default setting. Then, I’ll paint over the orange balloon to change its color to dark purple. Here’s the result:

Something’s not quite right.

Hmm. It’s definitely purple, but it doesn’t quite look like the other purple balloons, does it? The problem is that it’s much lighter than the other purple balloons, and that’s because the original color of the balloon was much lighter than the dark purple color I sampled. The Color blend mode had no effect on the brightness. In fact, the only blend mode that does change the brightness is Luminosity, so let’s try that one. I’ll change my blend mode in the Options Bar to Luminosity:

The Luminosity blend mode matches the brightness of the original color to the brightness of the new color.

I’ll undo my steps to change the balloon back to its original orange color, and then, with my blend mode set to Luminosity this time, I’ll try replacing the orange with dark purple:

Suddenly the light purple didn’t look so bad.

I think it’s safe to say that things did not go well. The Luminosity blend mode definitely made the balloon darker, but it’s still orange, and now most of the texture detail is gone! It barely looks like a balloon at all at this point, and this is the problem we face with the Color Replacement Tool. It works great for simple tasks where you only need to change the hue and/or saturation of a color, but if there’s too much of a difference in brightness values between the original color and the new color, you’ll probably want to try something else.

Sampling Options

From left to right – the Continuous, Once and Background Swatch sampling options.

These sampling options control how Photoshop samples colors in the image as you move the target symbol over them, or if it samples them at all. With Continuous selected, Photoshop continually looks for new colors to replace as you drag the Color Replacement Tool around. Any new color the target symbol passes over becomes the new color to replace. This is the setting you’ll use most often and works best when there’s a lot of variation in the color of the object.

The Background Swatch sampling option will replace the Background color with the Foreground color.

Limits

Another option that works exactly the same with the Color Replacement Tool as it does with the Background Eraser is Limits, which controls where Photoshop can look for colors to replace. The three choices are Contiguous, Discontiguous and Find Edges. Of the three, you’ll really only ever use the first two:

The Limits option.

The default setting for the Limits option is Contiguous, which means that the Color Replacement Tool can only change the color of pixels in the area the target symbol in the center of the cursor is touching. It won’t affect pixels that match the sampled color but are separated from the target symbol by an area of a different color unless you physically move the target symbol into the new area. The opposite of this is Discontiguous, which allows the Color Replacement Tool to replace the color of any pixels that match the sampled color and fall within the boundaries of the cursor, whether those pixels are in the same area as the target symbol or not.

Anti-Alias

The final option for the Color Replacement Tool is Anti-alias, which is selected by default. Keep this option selected to smooth out the edges around the areas the Color Replacement Tool is affecting:

The Anti-alias option.

And there we have it! That’s how to change the color of an object in a photo with the Color Replacement Tool in Photoshop! Check out our Photo Retouching section for more Photoshop image editing tutorials!

Update the detailed information about Tutorial: Unlock Iphone 3.1.2 With Blacksn0W on the Kientrucdochoi.com website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!