- Color Struct
- Definition
- Examples
- Remarks
- XAML Attribute Usage
- XAML Values
- Properties
- Methods
- Operators
- Explicit Interface Implementations
- Color Структура
- Определение
- Примеры
- Комментарии
- Использование атрибута XAML XAML Attribute Usage
- Значения XAML XAML Values
- Свойства
- Методы
- Операторы
- Явные реализации интерфейса
- Color Context Класс
- Определение
- Примеры
- Комментарии
- Конструкторы
- Свойства
- Методы
- Операторы
Color Struct
Definition
Describes a color in terms of alpha, red, green, and blue channels.
Examples
This example shows how to use sRGB, ScRGB, and color profile values to create the color blue.
Remarks
XAML Attribute Usage
XAML Values
predefinedColor
One of the colors predefined by the Colors class.
rgb
A three-digit hexadecimal number. The first digit specifies the color’s R value, the second digit specifies the G value, and the third digit specifies the B value. For example, 00F .
argb
A four-digit hexadecimal number. The first digit specifies the color’s A value, the second digit specifies its R value, the next digit specifies the G value, and the final digit specifies its B value. For example, F00F .
rrggbb
A six-digit hexadecimal number. The first two digits specify the color’s R value, the next two specify its G value, and the final two specify its B value. For example, 0000FF .
aarrggbb
An eight-digit hexadecimal number. The first two digits specify the color’s A value, the next two specify its R value, the next two specify its G value, and the final two specify its B value. For example, FF0000FF .
The color’s ScA value.
The color’s ScR value.
The color’s ScG value.
The color’s ScB value.
The International Color Consortium (ICC) or Image Color Management (ICM) color profile.
The alpha channel color value. The value range is 0.0 to 1.0.
A comma-delimited list of three to eight values that represent the color channels of the color profile. The value range is 0.0 to 1.0.
Properties
Gets or sets the sRGB alpha channel value of the color.
Gets or sets the sRGB blue channel value of the color.
Gets the International Color Consortium (ICC) or Image Color Management (ICM) color profile of the color.
Gets or sets the sRGB green channel value of the color.
Gets or sets the sRGB red channel value of the color.
Gets or sets the ScRGB alpha channel value of the color.
Gets or sets the ScRGB blue channel value of the color.
Gets or sets the ScRGB green channel value of the color.
Gets or sets the ScRGB red channel value of the color.
Methods
Adds two Color structures.
Compares two Color structures for fuzzy equality.
Sets the ScRGB channels of the color to within the gamut of 0 to 1, if they are outside that range.
Tests whether the specified Color structure is identical to this color.
Tests whether two Color structures are identical.
Tests whether the specified object is a Color structure and is equivalent to this color.
Creates a new Color structure by using the specified sRGB alpha channel and color channel values.
Creates a new Color structure by using the specified alpha channel, color channel values, and color profile.
Creates a new Color structure by using the specified sRGB color channel values.
Creates a new Color structure by using the specified ScRGB alpha channel and color channel values.
Creates a new Color structure by using the specified color channel values and color profile.
Gets a hash code for this Color structure.
Gets the color channel values of the color.
Multiplies the alpha, red, blue, and green channels of the specified Color structure by the specified value.
Subtracts a Color structure from a Color structure.
Creates a string representation of the color using the sRGB channels.
Creates a string representation of the color by using the sRGB channels and the specified format provider.
Operators
Adds two Color structures.
Tests whether two Color structures are identical.
Tests whether two Color structures are not identical.
Multiplies the alpha, red, blue, and green channels of the specified Color structure by the specified value.
Subtracts a Color structure from a Color structure.
Explicit Interface Implementations
Formats the value of the current instance using the specified format.
Color Структура
Определение
Описывает цвет в терминах каналов альфа, красного, зеленого и синего. Describes a color in terms of alpha, red, green, and blue channels.
Примеры
В этом примере показано, как использовать значения sRGB, ScRGB и цветового профиля для создания синего цвета. This example shows how to use sRGB, ScRGB, and color profile values to create the color blue.
Комментарии
Использование атрибута XAML XAML Attribute Usage
Значения XAML XAML Values
предефинедколор predefinedColor
Один из цветов, предопределенных Colors классом. One of the colors predefined by the Colors class.
цвета rgb
Шестнадцатеричное число из трех цифр. A three-digit hexadecimal number. Первая цифра задает R значение цвета, вторая цифра — G значение, а третья цифра — B значение. The first digit specifies the color’s R value, the second digit specifies the G value, and the third digit specifies the B value. Например, 00F . For example, 00F .
ARGB argb
Шестнадцатеричное число из четырех цифр. A four-digit hexadecimal number. Первая цифра задает A значение цвета, вторая цифра указывает его R значение, следующая цифра указывает G значение, а последняя цифра указывает его B значение. The first digit specifies the color’s A value, the second digit specifies its R value, the next digit specifies the G value, and the final digit specifies its B value. Например, F00F . For example, F00F .
RRGGBB rrggbb
Шестнадцатеричное число из шести цифр. A six-digit hexadecimal number. Первые две цифры задают R значение цвета, затем два значения задают его значение G , а последние два указывают его B значение. The first two digits specify the color’s R value, the next two specify its G value, and the final two specify its B value. Например, 0000FF . For example, 0000FF .
aarrggbb aarrggbb
Шестнадцатеричное число из восьми цифр. An eight-digit hexadecimal number. Первые две цифры задают A значение цвета, два следующих параметра задают его значение, R а следующие два указывают его значение G , а последние два указывают его B значение. The first two digits specify the color’s A value, the next two specify its R value, the next two specify its G value, and the final two specify its B value. Например, FF0000FF . For example, FF0000FF .
ScAЗначение цвета. The color’s ScA value.
ScRЗначение цвета. The color’s ScR value.
ScGЗначение цвета. The color’s ScG value.
ScBЗначение цвета. The color’s ScB value.
Цветовой профиль «языковой консорциум (ICC)» или «управление цветом изображения» (ICM). The International Color Consortium (ICC) or Image Color Management (ICM) color profile.
Значение цвета альфа-канала. The alpha channel color value. Диапазон значений — от 0,0 до 1,0. The value range is 0.0 to 1.0.
Разделенный запятыми список из трех и восьми значений, представляющих цветовые каналы цветового профиля. A comma-delimited list of three to eight values that represent the color channels of the color profile. Диапазон значений — от 0,0 до 1,0. The value range is 0.0 to 1.0.
Свойства
Получает или задает значение альфа-канала цвета sRGB . Gets or sets the sRGB alpha channel value of the color.
Получает или задает значение синего канала цвета sRGB . Gets or sets the sRGB blue channel value of the color.
Возвращает цветовой профиль для цвета (ICC) или управления цветом изображения (ICM). Gets the International Color Consortium (ICC) or Image Color Management (ICM) color profile of the color.
Получает или задает значение зеленого канала цвета sRGB . Gets or sets the sRGB green channel value of the color.
Получает или задает значение красного канала цвета sRGB . Gets or sets the sRGB red channel value of the color.
Получает или задает значение альфа-канала цвета ScRGB . Gets or sets the ScRGB alpha channel value of the color.
Получает или задает значение синего канала ScRGB цвета. Gets or sets the ScRGB blue channel value of the color.
Получает или задает значение зеленого канала цвета ScRGB . Gets or sets the ScRGB green channel value of the color.
Получает или задает значение красного канала цвета ScRGB . Gets or sets the ScRGB red channel value of the color.
Методы
Складывает две структуры Color. Adds two Color structures.
Сравнивает две структуры Color на предмет их нечеткого равенства. Compares two Color structures for fuzzy equality.
Присваивает каналам ScRGB цвета значения в диапазоне от 0 до 1, если они находятся за пределами этого диапазона. Sets the ScRGB channels of the color to within the gamut of 0 to 1, if they are outside that range.
Проверяет, идентична ли заданная структура Color этому цвету. Tests whether the specified Color structure is identical to this color.
Проверяет идентичность двух структур Color. Tests whether two Color structures are identical.
Проверяет, является ли указанный объект структурой Color, эквивалентной этому цвету. Tests whether the specified object is a Color structure and is equivalent to this color.
Создает новую структуру Color с использованием заданных значений альфа-канала и цветовых каналов sRGB . Creates a new Color structure by using the specified sRGB alpha channel and color channel values.
Создает новую структуру Color с использованием заданного альфа-канала, значений цветовых каналов и цветового профиля. Creates a new Color structure by using the specified alpha channel, color channel values, and color profile.
Создает новую структуру Color с использованием заданных значений цветовых каналов sRGB . Creates a new Color structure by using the specified sRGB color channel values.
Создает новую структуру Color с использованием заданных значений альфа-канала и цветовых каналов ScRGB . Creates a new Color structure by using the specified ScRGB alpha channel and color channel values.
Создает новую структуру Color с использованием заданных значений цветовых каналов и цветового профиля. Creates a new Color structure by using the specified color channel values and color profile.
Получает хэш-код для структуры Color. Gets a hash code for this Color structure.
Получает значения цветовых каналов цвета. Gets the color channel values of the color.
Умножает альфа, красный, синий и зеленый каналы заданной структуры Color на заданное значение. Multiplies the alpha, red, blue, and green channels of the specified Color structure by the specified value.
Вычитает структуру Color из структуры Color. Subtracts a Color structure from a Color structure.
Создает строковое представление цвета с использованием каналов sRGB . Creates a string representation of the color using the sRGB channels.
Создает строковое представление цвета с использованием каналов sRGB и заданного поставщика формата. Creates a string representation of the color by using the sRGB channels and the specified format provider.
Операторы
Складывает две структуры Color. Adds two Color structures.
Проверяет идентичность двух структур Color. Tests whether two Color structures are identical.
Проверяет, действительно ли две структуры Color являются не идентичными. Tests whether two Color structures are not identical.
Умножает альфа, красный, синий и зеленый каналы заданной структуры Color на заданное значение. Multiplies the alpha, red, blue, and green channels of the specified Color structure by the specified value.
Вычитает структуру Color из структуры Color. Subtracts a Color structure from a Color structure.
Явные реализации интерфейса
Форматирует значение текущего экземпляра, используя указанный формат. Formats the value of the current instance using the specified format.
Color Context Класс
Определение
Представляет цветовой профиль ICC (International Color Consortium — международный консорциум по цвету) или ICM (Image Color Management — управление цветом изображений), связанный с растровым изображением. Represents the International Color Consortium (ICC) or Image Color Management (ICM) color profile that is associated with a bitmap image.
Примеры
В следующем примере кода показано, как получить цветовой профиль, связанный с растровым изображением. The following code example demonstrates how to get the color profile that is associated with a bitmap image.
Комментарии
Поддерживаемые стандартные цветовые пространства: sRGB, ScRGB, RGB, CMYK, серый, многоканальный и неизвестный. The supported standard color spaces are sRGB, ScRGB, RGB, CMYK, Gray, Multichannel, and unknown.
Конструкторы
Инициализирует новый экземпляр ColorContext со стандартным цветовым профилем (sRGB или RGB), который наиболее полно соответствует предоставленному объекту PixelFormat. Initializes a new instance of ColorContext with the standard color profile (sRGB or RGB ) that most closely matches the supplied PixelFormat.
Инициализирует новый экземпляр ColorContext с помощью цветового профиля «языковой консорциум (ICC)» или «Управление цветом изображения» (ICM), расположенного в заданном Uri . Initializes a new instance of ColorContext with the International Color Consortium (ICC) or Image Color Management (ICM) color profile located at a given Uri.
Свойства
Возвращает объект Uri , представляющий расположение цветового профиля (ICC) или цвета управления цветом изображения (ICM). Gets a Uri that represents the location of a International Color Consortium (ICC) or Image Color Management (ICM) color profile.
Методы
Определяет, равен ли объект Object экземпляру объекта ColorContext. Determines whether an Object is equal to an instance of ColorContext.
Получает хэш-код для этого экземпляра ColorContext. Gets the hash code for this instance of ColorContext.
Возвращает объект Type для текущего экземпляра. Gets the Type of the current instance.
(Унаследовано от Object)
Создает неполную копию текущего объекта Object. Creates a shallow copy of the current Object.
(Унаследовано от Object)
Возвращает доступный для чтения Stream необработанных данных цветового профиля. Returns a readable Stream of raw color profile data.
Возвращает строку, представляющую текущий объект. Returns a string that represents the current object.
(Унаследовано от Object)
Операторы
Оценивает два экземпляра ColorContext для определения равенства. Operates on two instances of ColorContext to determine equality.
Сравнивает два экземпляра ColorContext, чтобы определить, являются ли они неравными. Operates on two instances of ColorContext to determine that they are not equal.