0

In my Colors Catalog, I want to reuse the same color.

In the following example, instead of writing the same hex value for multiple entires, I want to add it the the list under Color > Content, where Display P3 and Extended Range sRGB reside.

enter image description here

danielhadar
  • 2,031
  • 1
  • 16
  • 27
  • You can't because they aren't the same thing. A "named color" is a color _set_ - containing information about what _individual color_ it should be for different traits. The list that you showed in the screenshot lets you select _one individual color_. You can't select a color set, because _which color in the set would it use?_ – Sweeper Jul 29 '20 at 06:02
  • @Sweeper Perhaps my question wasn't clear. Xcode predefines a set of colors, such as `darkTextColor` and `linkColor`, which are system colors that makes sense that'll be reused. My question is - can I add a color there manually? Same was I can use `linkColor` for 2 different color sets. – danielhadar Jul 29 '20 at 06:03
  • go in color menu, scroll down, open costum colors, system color palette opens. choose your colors and drop them in the rectangles below.. use them in all apps. – Ol Sen Jul 29 '20 at 06:21
  • @OlSen I think you didn't understand my question. I asked if it's possible to _add a color_ to that list. – danielhadar Jul 29 '20 at 06:27

3 Answers3

1

Simple and works system wide in all apps.
You can open images to select colors from and you can insert colors in any palette with macOS color picker.

enter image description here

The list you are asking for is for color profiles, which is what Apple's "ColorSync Utility.app" is for but does not mean you can change Xcode.

Just to make it complete.. Maybe you are looking for "Color Sense" plugins or Apps which can make developers life easier when coding colors. The idea is you start writing NSColor or UIColor and code completion opens a color picker for you which will help you writing the color codes or pick one of yours. There is plenty of talk about it even here on stackoverflow.. but as the API changes sometime a little cause of the evolution of Xcode you would have to compile it yourself. see xcode code sense color/completion not working

I don't want to make advertisment for any product here.
But if color stuff becomes to complex in a project i use a tool that helps me writing a Color class where i keep all colors together and supports me with color conversions as needed.

Ol Sen
  • 3,163
  • 2
  • 21
  • 30
0

To elaborate on the previous solution, it's possible to add a custom palette. Still not exactly what I was looking for, but it's getting closer:

enter image description here

danielhadar
  • 2,031
  • 1
  • 16
  • 27
0

in the assets folder , choose a set color, then give it a name and customize it, for darkmode etc. if not only the one color.and when you are choosing colors in the storyboard they apear among the first ones. https://i.stack.imgur.com/8I4Kz.png

Ali Ash
  • 1
  • 1
  • 3