Generated from protobuf messagegoogle.cloud.retail.v2.ColorInfo
Namespace
Google \ Cloud \ Retail \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ color_families
array
The standard color families. Strongly recommended to use the following standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple", "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed". Normally it is expected to have only 1 color family. May consider using single "Mixed" instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center propertycolor. Schema.org propertyProduct.color. The colorFamilies field as a system attribute is not a required field but strongly recommended to be specified. Google Search models treat this field as more important than a custom product attribute when specified.
↳ colors
array
The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single "Mixed" instead of multiple values. A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center propertycolor. Schema.org propertyProduct.color.
getColorFamilies
The standard color families. Strongly recommended to use the following
standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple",
"Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed".
Normally it is expected to have only 1 color family. May consider using
single "Mixed" instead of multiple values.
A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
string with a length limit of 128 characters. Otherwise, an
INVALID_ARGUMENT error is returned.
Google Merchant Center propertycolor. Schema.org
propertyProduct.color.
The colorFamilies field as a system attribute is not a required field but
strongly recommended to be specified. Google Search models treat this field
as more important than a custom product attribute when specified.
The standard color families. Strongly recommended to use the following
standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple",
"Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed".
Normally it is expected to have only 1 color family. May consider using
single "Mixed" instead of multiple values.
A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
string with a length limit of 128 characters. Otherwise, an
INVALID_ARGUMENT error is returned.
Google Merchant Center propertycolor. Schema.org
propertyProduct.color.
The colorFamilies field as a system attribute is not a required field but
strongly recommended to be specified. Google Search models treat this field
as more important than a custom product attribute when specified.
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getColors
The color display names, which may be different from standard color family
names, such as the color aliases used in the website frontend. Normally
it is expected to have only 1 color. May consider using single "Mixed"
instead of multiple values.
A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded
string with a length limit of 128 characters. Otherwise, an
INVALID_ARGUMENT error is returned.
Google Merchant Center propertycolor. Schema.org
propertyProduct.color.
The color display names, which may be different from standard color family
names, such as the color aliases used in the website frontend. Normally
it is expected to have only 1 color. May consider using single "Mixed"
instead of multiple values.
A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded
string with a length limit of 128 characters. Otherwise, an
INVALID_ARGUMENT error is returned.
Google Merchant Center propertycolor. Schema.org
propertyProduct.color.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Google Cloud Retail V2 Client - Class ColorInfo (2.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.1 (latest)](/php/docs/reference/cloud-retail/latest/V2.ColorInfo)\n- [2.3.0](/php/docs/reference/cloud-retail/2.3.0/V2.ColorInfo)\n- [2.2.1](/php/docs/reference/cloud-retail/2.2.1/V2.ColorInfo)\n- [2.1.3](/php/docs/reference/cloud-retail/2.1.3/V2.ColorInfo)\n- [2.0.0](/php/docs/reference/cloud-retail/2.0.0/V2.ColorInfo)\n- [1.7.0](/php/docs/reference/cloud-retail/1.7.0/V2.ColorInfo)\n- [1.6.4](/php/docs/reference/cloud-retail/1.6.4/V2.ColorInfo)\n- [1.5.0](/php/docs/reference/cloud-retail/1.5.0/V2.ColorInfo)\n- [1.4.2](/php/docs/reference/cloud-retail/1.4.2/V2.ColorInfo)\n- [1.3.1](/php/docs/reference/cloud-retail/1.3.1/V2.ColorInfo)\n- [1.2.1](/php/docs/reference/cloud-retail/1.2.1/V2.ColorInfo)\n- [1.1.1](/php/docs/reference/cloud-retail/1.1.1/V2.ColorInfo)\n- [1.0.1](/php/docs/reference/cloud-retail/1.0.1/V2.ColorInfo) \nReference documentation and code samples for the Google Cloud Retail V2 Client class ColorInfo.\n\nThe color information of a [Product](/php/docs/reference/cloud-retail/latest/V2.Product).\n\nGenerated from protobuf message `google.cloud.retail.v2.ColorInfo`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Retail \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getColorFamilies\n\nThe standard color families. Strongly recommended to use the following\nstandard color groups: \"Red\", \"Pink\", \"Orange\", \"Yellow\", \"Purple\",\n\"Green\", \"Cyan\", \"Blue\", \"Brown\", \"White\", \"Gray\", \"Black\" and \"Mixed\".\n\nNormally it is expected to have only 1 color family. May consider using\nsingle \"Mixed\" instead of multiple values.\nA maximum of 5 values are allowed. Each value must be a UTF-8 encoded\nstring with a length limit of 128 characters. Otherwise, an\nINVALID_ARGUMENT error is returned.\nGoogle Merchant Center property\n[color](https://support.google.com/merchants/answer/6324487). Schema.org\nproperty [Product.color](https://schema.org/color).\nThe colorFamilies field as a system attribute is not a required field but\nstrongly recommended to be specified. Google Search models treat this field\nas more important than a custom product attribute when specified.\n\n### setColorFamilies\n\nThe standard color families. Strongly recommended to use the following\nstandard color groups: \"Red\", \"Pink\", \"Orange\", \"Yellow\", \"Purple\",\n\"Green\", \"Cyan\", \"Blue\", \"Brown\", \"White\", \"Gray\", \"Black\" and \"Mixed\".\n\nNormally it is expected to have only 1 color family. May consider using\nsingle \"Mixed\" instead of multiple values.\nA maximum of 5 values are allowed. Each value must be a UTF-8 encoded\nstring with a length limit of 128 characters. Otherwise, an\nINVALID_ARGUMENT error is returned.\nGoogle Merchant Center property\n[color](https://support.google.com/merchants/answer/6324487). Schema.org\nproperty [Product.color](https://schema.org/color).\nThe colorFamilies field as a system attribute is not a required field but\nstrongly recommended to be specified. Google Search models treat this field\nas more important than a custom product attribute when specified.\n\n### getColors\n\nThe color display names, which may be different from standard color family\nnames, such as the color aliases used in the website frontend. Normally\nit is expected to have only 1 color. May consider using single \"Mixed\"\ninstead of multiple values.\n\nA maximum of 75 colors are allowed. Each value must be a UTF-8 encoded\nstring with a length limit of 128 characters. Otherwise, an\nINVALID_ARGUMENT error is returned.\nGoogle Merchant Center property\n[color](https://support.google.com/merchants/answer/6324487). Schema.org\nproperty [Product.color](https://schema.org/color).\n\n### setColors\n\nThe color display names, which may be different from standard color family\nnames, such as the color aliases used in the website frontend. Normally\nit is expected to have only 1 color. May consider using single \"Mixed\"\ninstead of multiple values.\n\nA maximum of 75 colors are allowed. Each value must be a UTF-8 encoded\nstring with a length limit of 128 characters. Otherwise, an\nINVALID_ARGUMENT error is returned.\nGoogle Merchant Center property\n[color](https://support.google.com/merchants/answer/6324487). Schema.org\nproperty [Product.color](https://schema.org/color)."]]