Supported Library Element Types
This document provides detail on currently supported library element types; the amount of information here should be enough to get started creating any of these types, however, it may not, in certain circumstances, be completely comprehensive. This document assumes general familiarity with Libraries and the element creation process.
The element types are:
Graphics
Element Type
application/vnd.adobe.element.image+dcx
Description
Represents any still image.
Allowed Representation Types
The set of types that is allowed is quite expansive, and changes frequently. This includes common image types, file formats specific to different Creative Cloud applications, and, in certain contexts, types we can convert to images, including things like PDFs, Word documents, etc. However, the most common types are:
- image/gif
- image/jpeg
- image/jpg
- image/png
- image/svg+xml
Representation Requirements
- if the primary representation is not a bitmap, a fullsize bitmap rendition that can be used for thumbnails
- optionally, other renditions depending on what apps may consume the image
Example postLibraryElement Payload
{
"name": "my-cool-image",
"type": "application/vnd.adobe.element.image+dcx",
"client": {
"deviceId": "MY_COOL_DEVICE_ID",
"device": "MY_COOL_DEVICE",
"app": "MY_COOL_APP"
},
"representations": [
{
"type": "image/svg+xml",
"relationship": "primary",
"storage_href": "https://cc-api-storage-stage.adobe.io/assets/adobe-libraries/4dc522a7-af3d-4274-986c-bb1f59bb20d0/3f4d2883-f7e5-4d64-bec1-f153ae5d80af"
},
{
"type": "image/png",
"relationship": "rendition",
"storage_href": "https://cc-api-storage-stage.adobe.io/assets/adobe-libraries/4dc522a7-af3d-4274-986c-bb1f59bb20d0/ec13e4e1-1c56-4d84-89ad-8df52f42ae8a"
}
]
}
Color
Element Type
application/vnd.adobe.element.color+dcx
Description
Represents a single color.
Allowed Representation Types
application/vnd.adobe.color+json
Every color representation requires a property named "color#data", the value of which is a JSON structure that represents the color. This structure may have the following properties:
'value' will change depending on 'mode' as follows:
The different color "types" are as follows - note that all colors require the process values for the color mode, even if they're of a non-process type, so that they're supported in apps that only understand process colors.
Representation Requirements
- At least one RGB representation
- optionally, other renditions
Example postLibraryElement Payload
{
"name": "my-color",
"type": "application/vnd.adobe.element.color+dcx",
"client": {
"deviceId": "MY_COOL_DEVICE_ID",
"device": "MY_COOL_DEVICE",
"app": "MY_COOL_APP"
},
"representations": [
{
"type": "application/vnd.adobe.color+json",
"relationship": "primary",
"color#data": {
"mode": "CMYK",
"value": {
"c": 100,
"m": 79.0585160255432,
"y": 39.5178139209747,
"k": 31.2565803527832
},
"type": "process"
}
},
{
"type": "application/vnd.adobe.color+json",
"relationship": "rendition",
"color#data": {
"mode": "RGB",
"value": {
"r": 12.7313232421875,
"g": 56.0341644287109,
"b": 89.8001861572266
},
"type": "process"
}
}
]
}
Color Theme
Element Type
application/vnd.adobe.element.colortheme+dcx
Description
Represents a color theme, a collection of 5 colors.
Allowed Representation Types
application/vnd.adobe.colortheme+json
The colortheme JSON requires a property named "colortheme#data", containing a structure with the following properties:
Swatches
Swatches should contain an array of exactly 5 arrays. Each array contains objects in the format defined for Color that are all representations of the same color and must include at least one RGB representation. The primary representation of any single color will always be at index 0 in the array.
Representation Requirements
- A application/vnd.adobe.colortheme+json primary representation.
Example postLibraryElement Payload
{
"name": "my-cool-colortheme",
"type": "application/vnd.adobe.element.colortheme+dcx",
"client": {
"deviceId": "MY_COOL_DEVICE_ID",
"device": "MY_COOL_DEVICE",
"app": "MY_COOL_APP"
},
"representations": [
{
"type": "application/vnd.adobe.colortheme+json",
"relationship": "primary",
"colortheme#data": {
"tags": ["tag1", "tag2"],
"baseSwatchIndex": 0,
"rule": "analogous",
"mood": "colorful",
"swatches": [
[
{
"mode": "CMYK",
"value": {
"c": 0,
"m": 12,
"y": 37,
"k": 30
}
},
{
"mode": "RGB",
"value": {
"r": 179,
"g": 158,
"b": 113
},
"type": "process",
"profileName": "sRGB IEC61966-2.1"
}
],
[
{
"mode": "CMYK",
"value": {
"c": 17,
"m": 0,
"y": 7,
"k": 0
}
},
{
"mode": "RGB",
"value": {
"r": 212,
"g": 255,
"b": 237
},
"type": "process",
"profileName": "sRGB IEC61966-2.1"
}
],
[
{
"mode": "CMYK",
"value": {
"c": 0,
"m": 8,
"y": 27,
"k": 0
}
},
{
"mode": "RGB",
"value": {
"r": 255,
"g": 234,
"b": 187
},
"type": "process",
"profileName": "sRGB IEC61966-2.1"
}
],
[
{
"mode": "CMYK",
"value": {
"c": 9,
"m": 37,
"y": 0,
"k": 20
}
},
{
"mode": "RGB",
"value": {
"r": 185,
"g": 129,
"b": 204
},
"type": "process",
"profileName": "sRGB IEC61966-2.1"
}
],
[
{
"mode": "CMYK",
"value": {
"c": 8,
"m": 32,
"y": 0,
"k": 30
}
},
{
"mode": "RGB",
"value": {
"r": 164,
"g": 122,
"b": 179
},
"type": "process",
"profileName": "sRGB IEC61966-2.1"
}
]
]
}
}
]
}
Gradient
Element Type
application/vnd.adobe.element.gradient+dcx
Description
Represents a collection of colors (color stops), combined with some algorithm for interpolating between them.
Allowed Representation Types
application/vnd.adobe.gradient+json
You may also encounter a representation type of "application/vnd.adobe.gradient.noise+json", which represents a noise gradient. This is a custom gradient type used by Photoshop as a mechanism to represent textures; this gradient type contains additional fields to the ones below.
Point:
Opacity:
Representation Requirements
- Primary application/vnd.adobe.gradient+json representation.
Example postLibraryElement Payload
{
"name": "my-cool-gradient",
"type": "application/vnd.adobe.element.gradient+dcx",
"client": {
"deviceId": "MY_COOL_DEVICE_ID",
"device": "MY_COOL_DEVICE",
"app": "MY_COOL_APP"
},
"representations": [
{
"id": "d8453c78-4dd4-44c0-ab18-0114e171aa84",
"type": "application/vnd.adobe.gradient+json",
"relationship": "primary",
"gradient#data": {
"type": "linear",
"angle": 0,
"stops": [
{
"color": [
{
"mode": "RGB",
"value": {
"r": 102.0,
"g": 238.0,
"b": 207.0
},
"type": "process",
"profileName": "sRGB IEC61966-2.1"
},
{
"mode": "CMYK",
"value": {
"c": 48,
"m": 0.0,
"y": 30.0,
"k": 0.0
},
"type": "process",
"profileName": "U.S. Web Coated (SWOP) v2"
}
],
"midpoint": 0,
"offset": 0
},
{
"color": [
{
"mode": "RGB",
"value": {
"r": 74.0,
"g": 96.0,
"b": 204.0
},
"type": "process",
"profileName": "sRGB IEC61966-2.1"
},
{
"mode": "CMYK",
"value": {
"c": 77,
"m": 67.0,
"y": 0.0,
"k": 0.0
},
"type": "process",
"profileName": "U.S. Web Coated (SWOP) v2"
}
],
"midpoint": 0.5,
"offset": 1.0
}
],
"opacities": [
{
"opacity": 1.0,
"midpoint": 0,
"offset": 0
},
{
"opacity": 1.0,
"midpoint": 0.5,
"offset": 1.0
}
],
"interpolation": "linear"
}
}
]
}
Character Style
Element Type
application/vnd.adobe.element.characterstyle+dcx
Description
Represents a collection of styles that may be applied to characters within some text.
Allowed Representation Types
application/vnd.adobe.characterstyle+json
Every representation of type "application/vnd.adobe.characterstyle+json" should contain a property named "characterstyle#data". The value of characterstyle#data should be a dictionary containing at least one property. Each of these properties should represent a style.
There are three categories of styles: standard CSS styles, with the name in camelCase instead of kebab-case, e.g. "lineHeight" instead of "line-height"; internal styles that are valid across multiple adobe applications, the names of which will be in camelCase and prefixed with "adbe', e.g., "adbeFont"; and, internal styles only valid within a single application, which are typically prefixed with "adbe" followed by an abbreviation of the application name and then the style name, e.g., "adbeIlstOpenTypePosition" for a style only valid for Adobe Illustrator. Styles in this third category may change frequently depending on application-specific requirements.
For any style that may have an enumerated value, the value will just be a string, e.g., {"fontStyle": "italic"}. For any style that may require a list of items, the value should be represented as an array, e.g., {"fontFeatureSettings": ["aalt", "liga", "flac"]}. For any style that is measured with some css unit, the property value should be a dictionary containing a "type" and "value" property that separate these components, e.g., "56vm" would be represented as {"value": 56, "type": "vm"}. Additionally, most styles will have their own special requirements.
Due to the variety of constraints within each style, application-derived interrelationships between styles, and, the possibility that some will change over time in accordance with application-specific requirements, it may be helpful to try prototyping character styles within a Creative Cloud app first, before attempting to create them ex situ.
Some frequently used styles:
application/vnd.adobe.indesign-idms
A character style may also be represented as an InDesign snippet.
Representation Requirements
- A mandatory application/vnd.adobe.characterstyle+json representation, which may have the primary relationship, or the rendition relationship, in the case where an InDesign snippet is used as the primary.
- Optionally, a primary representation of type application/vnd.adobe.indesign-idms, if the json representation is not primary.
- A mandatory thumbnail rendition, e.g, of type "image/png".
Example postLibraryElement Payload
{
"name": "My character style",
"type": "application/vnd.adobe.element.characterstyle+dcx",
"client": {
"deviceId": "DEV_ID",
"device": "DEV",
"app": "APP"
},
"representations": [
{
"id": "76ab62cd-f0fd-4778-ae4f-ce7a2aa4d7d0",
"type": "application/vnd.adobe.characterstyle+json",
"relationship": "primary",
"is_full_size": false,
"is_external_link": false,
"preferredThumbnail": false,
"representation_order": 0,
"characterstyle#data": {
"color": [
{
"mode": "RGB",
"value": {
"r": 0,
"g": 0,
"b": 0
},
"type": "process"
}
],
"adbeFont": {
"family": "Helvetica Neue",
"name": "HelveticaNeue",
"postScriptName": "HelveticaNeue",
"style": "Regular"
},
"fontFamily": "Helvetica Neue",
"fontSize": {
"type": "pt",
"value": 18
},
"adbeIlstAlignment": "StyleRunAlignmentType.ROMANBASELINE",
"adbeIlstBaselineDirection": "BaselineDirectionType.Standard",
"adbeIlstBaselinePosition": "FontBaselineOption.NORMALBASELINE",
"adbeIlstCapitalization": "FontCapsOption.NORMALCAPS",
"adbeIlstFigureStyle": "FigureStyleType.DEFAULTFIGURESTYLE",
"adbeIlstOpenTypePosition": "FontOpenTypePositionOption.OPENTYPEDEFAULT",
"adbeIlstWariChuJustification": "WariChuJustificationType.WARICHUAUTOJUSTIFY",
"adbeIlstAkiLeft": -1,
"adbeIlstAkiRight": -1,
"adbeAutoLeading": true,
"adbeIlstConnectionForms": false,
"adbeHorizontalScale": 100,
"lineHeight": {
"type": "pt",
"value": 21.6000003814697
},
"adbeIlstOverprintFill": false,
"adbeIlstOverprintStroke": false,
"adbeIlstProportionalMetrics": false,
"adbeIlstRotation": 0,
"adbeIlstTateChuYokoHorizontal": 0,
"adbeIlstTateChuYokoVertical": 0,
"fontFeatureSettings": ["clig", "liga"],
"adbeIlstTsume": 0,
"adbeVerticalScale": 100,
"adbeIlstWariChuCharactersAfterBreak": 2,
"adbeIlstWariChuCharactersBeforeBreak": 2,
"adbeIlstWariChuEnabled": false,
"adbeIlstWariChuLineGap": 0,
"adbeIlstWariChuLines": 2,
"adbeIlstWariChuScale": 50
}
},
{
"type": "image/png",
"relationship": "rendition",
"storage_href": "https://cc-api-storage-stage.adobe.io/id/urn:aaid:sc:US:efb1969b-fed5-4381-836e-6d7a97a14fbf?component_id=602eb2e4-d86d-481f-adc2-d751fc5ca961",
"content_length": 158356,
"etag": "\"9b4fb626b2ea694ceceda1b5caa7463c\"",
"md5": "m0+2JrLqaUzs7aG1yqdGPA==",
"version": "0"
}
]
}
Paragraph Style
Element Type
application/vnd.adobe.element.paragraphstyle+dcx
Description
Represents a collection of styles that may be applied to paragraphs.
Allowed Representation Types
application/vnd.adobe.paragraphstyle+json
This representation type is almost identical to application/vnd.adobe.characterstyle+json, except that the set of styles that are considered valid is a superset including all valid character styles alongside a set of styles that are only valid for paragraphs.
Some frequently used paragraph styles:
Representation Requirements
The requirements are identical to the character style element, except an application/vnd.adobe.paragraphstyle+json primary or rendition representation is expected instead of an application/vnd.adobe.characterstyle+json element:
- A mandatory application/vnd.adobe.paragraphstyle+json representation, which may have the primary relationship, or the rendition relationship, in the case where an InDesign snippet is used as the primary.
- Optionally, a primary representation of type application/vnd.adobe.indesign-idms, if the json representation is not primary.
- A mandatory thumbnail rendition, e.g, of type "image/png".
Example postLibraryElement Payload
{
"adbeParaAlignment": "Alignment.CENTER_ALIGN",
"adbeLeftIndent": { "type": "pt", "value": 12 },
"adbeHyphenateWordsLongerThan": 10,
"adbeHyphenation": true
}