Extensions function for the gdi+ color type.
GDIColors
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| Middle | 1 | x -> y:返回两个颜色之间的中间的颜色,这个函数是某些插值操作所需要的 |
| Alpha | 2 | 调整所输入的这一组颜色的alpha值 |
| Average | 1 | Create an average color via the average value of the A,R,G,B channels |
| Lighten | 1 | Creates a new light color object for the control from the specified color and lightens it by the specified percentage. |
| Darken | 1 | Makes the specified color darker: creates a new dark color object for the control from the specified color and darkens it by the specified percentage. |
| RGBExpression | 1 | rgb(r,g,b) |
| ARGBExpression | 1 | rgb(a,r,g,b) |
| Rgba | 1 | html rgba color |
| __getDotNetColors | 1 | Reads all of the color property from Color and then creates the color dictionary based on the property name. |
| ToColor | 1 | Color.Name, rgb(a,r,g,b) |
| TranslateColor | 1 | 这个函数会尝试用不同的模式来解析颜色表达式 |
| IsColorExpression | 1 | test of the given string expression is color value or not? |
| IsNullOrEmpty | 1 | Determine that the target color value is a empty variable.(判断目标颜色值是否为空值) |
| IsTransparent | 1 | Check of the given color value is transparent color? |
| Equals | 1 | 分别比较A,R,G,B这些属性值来判断这样个颜色对象值是否相等 |
| EuclideanDistance | 1 | Evaluate the color distance via euclidean distance |
| Red | 1 | |
| Green | 1 | |
| Blue | 1 | |
| HTMLColors | 1 | |
| Greyscale | 1 | |
| AsDefaultColor | 1 |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| AllDotNetPrefixColors | 1 | Gets all of the known name color from the Color object its shared property. |
| ChartColors | 1 | 经过人工筛选的颜色,不会出现过白或者过黑,过度相似的情况 |
| AllDotNetColorNames | 1 |
04 Fields
| Name | Overloads | Summary |
|---|---|---|
| __allDotNETPrefixColors | 1 | Key都是小写的 |
| rgbExprValues | 2 | Regex expression for parsing the rgb(a,r,g,b) expression of the color.(解析颜色表达式里面的RGB的正则表达式) |
| rgbExpr | 1 |
05 Members
Color, Color)**x** -> **y**:返回两个颜色之间的中间的颜色,这个函数是某些插值操作所需要的
| Name | Type | Description |
|---|---|---|
x | Color | - |
y | Color | - |
IEnumerable(Of Color), Int32)调整所输入的这一组颜色的alpha值
| Name | Type | Description |
|---|---|---|
colors | IEnumerable(Of Color) | - |
alphaValue% | Int32 | - |
Color, Int32)adjust the color alpha value, alpha=[0, 255]
| Name | Type | Description |
|---|---|---|
c | Color | - |
alphaValue% | Int32 | - |
IEnumerable(Of Color))Create an average color via the average value of the A,R,G,B channels
| Name | Type | Description |
|---|---|---|
colors | IEnumerable(Of Color) | - |
Color, Single)Creates a new light color object for the control from the specified color and lightens it by the specified percentage.
| Name | Type | Description |
|---|---|---|
base | Color | The |
percent! | Single | The percentage to lighten the specified |
A Color that represents the light color on the control.
Color, Single)Makes the specified color darker: creates a new dark color object for the control from the specified color and darkens it by the specified percentage.
| Name | Type | Description |
|---|---|---|
base | Color | The |
percent! | Single | The percentage to darken the specified |
A Color that represent the dark color on the control.
Color)rgb(r,g,b)
| Name | Type | Description |
|---|---|---|
c | Color | - |
Color)rgb(a,r,g,b)
| Name | Type | Description |
|---|---|---|
c | Color | - |
Color)html rgba color
| RGBA 成分 | 含义 | 取值范围 |
|---|---|---|
| R (Red) | 红色通道的强度 | 0 - 255 的整数 或 0% - 100% 的百分比 |
| G (Green) | 绿色通道的强度 | 0 - 255 的整数 或 0% - 100% 的百分比 |
| B (Blue) | 蓝色通道的强度 | 0 - 255 的整数 或 0% - 100% 的百分比 |
| A (Alpha) | 透明度(或不透明度) | 0.0(完全透明)到 1.0(完全不透明)之间的小数 |
| Name | Type | Description |
|---|---|---|
c | Color | - |
Reads all of the color property from Color and then creates the color dictionary based on the property name.
String, Color, Boolean, Boolean)Color.Name, rgb(a,r,g,b)
| Name | Type | Description |
|---|---|---|
str | String | 颜色表达式或者名称 |
String, Boolean, Boolean)这个函数会尝试用不同的模式来解析颜色表达式
| Name | Type | Description |
|---|---|---|
exp | String | RGB expression/html color/ole color, etc |
Color.Black will be return if the exp is null or empty,
String)test of the given string expression is color value or not?
| Name | Type | Description |
|---|---|---|
expression | String | the color expression string for make asserts:
|
Color)Determine that the target color value is a empty variable.(判断目标颜色值是否为空值)
Color)Check of the given color value is transparent color?
| Name | Type | Description |
|---|---|---|
c | Color | - |
Color, Color, Int32)分别比较A,R,G,B这些属性值来判断这样个颜色对象值是否相等
| Name | Type | Description |
|---|---|---|
a | Color | - |
b | Color | - |
Color, Color)Evaluate the color distance via euclidean distance
| Name | Type | Description |
|---|---|---|
a | Color | - |
b | Color | - |
Gets all of the known name color from the Color object its shared property.
经过人工筛选的颜色,不会出现过白或者过黑,过度相似的情况
Key都是小写的
Regex expression for parsing the rgb(a,r,g,b) expression of the color.(解析颜色表达式里面的RGB的正则表达式)
IEnumerable(Of Color))IEnumerable(Of Color))IEnumerable(Of Color))IEnumerable(Of Color))Single, Int32)Color)