Creating a custom color

Let's add colors to your Assets.xcassets folder. Adding colors here is great when you want to have all your colors in one location. Before we update our explore cell, let's create a new color:

  1. Open the Assets.xcassets file.
  2. Right-click inside of Assets.xcassets, where you will see folders, and create a new folder called colors:
  1. Right-click the colors folder, and, this time, select New Color Set. You will see a new color added to your folder. Select the Attributes inspector in the Utilities panel:
  1. Under Color set, update the name to Demo Grey.
  2. Under Color, click the Input Method dropdown:

  1. Select 8-bit Hexadecimal. Change the Hex # value to #AAAAAA. When you are done, you should see the following:

Now that we have a color, we will be able to find our new color in the Color dropdown, as you will see next.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.87.149