Named Color Type
The definition for a named color that can be used anywhere you can use a color in your project.
Extension
.colorset
Folder Contents
The Contents.json file.
Contents.json File (Required)
Metadata and attributes for the individual colors for the named color (Table 24-1).
Key |
Type |
Description |
|---|---|---|
|
Dictionary |
Metadata for the author and format version of the asset catalog. |
|
String |
Use your bundle ID. |
|
Number |
The format version of the asset catalog. Use |
|
Array |
Each element identifies one variant of the color. |
|
Slot component |
The color gamut of the device display. For the values, see display-gamut in Image Set Type. |
|
Slot Component |
The idiom of the icon. For the values, see idiom in Image Set Type. |
|
Dictionary |
One of the sizes that matches the idiom for the icon. If the size is not valid, the image is ignored. For the values, see size below. |
|
Slot Component |
The color space for the data item. For the values, see color-space in Image Set Type. |
|
Dictionary |
The RGBA color components for the named color. |
|
Number |
The red component of the custom color specified as a number from |
|
Number |
The green component of the custom color specified as a number from |
|
Number |
The blue component of the custom color specified as a number from |
|
Number |
The transparency of the custom color specified as a number from |
Values for Enumerated Tags
color-space
See color-space in Image Set Type.
display-gamut
See display-gamut in Image Set Type.
idiom
See idiom in Image Set Type.
Sample Contents.json File
{"colors" : [{"idiom" : "universal","display-gamut" : "sRGB","color" : {"components" : {"red" : 0.5,"green" : 0.5,"blue" : 0.5,"alpha" : 1},"color-space" : "srgb"},},{"idiom" : "universal","display-gamut" : "display-P3","color" : {"components" : {"red" : 0.5,"green" : 0.5,"blue" : 0.5,"alpha" : 1},"color-space" : "display-p3"},},…],"info" : {"author" : "com.developerName","version" : 1}}
Copyright © 2018 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2018-04-09
