Generate color sequence
Designer
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| ConsoleColor | 1 | 将ConsoleColor枚举值转换为gdi+颜色对象 |
| .cctor | 1 | |
| SplitColorList | 1 | 在这个函数里,需要保证颜色的顺序和表达式之中所输入的顺序一致 |
| GetColors | 2 | 这个函数是获取得到一个连续的颜色谱 |
| Register | 2 | register an external custom color palette function |
| getColorsInternal | 1 | a unify method for get color maps |
| GetBrushes | 1 | New SolidBrush(Designer.GetColors())) |
| FromNames | 1 | 相对于Designer.GetColors())函数而言,这个函数是返回非连续的颜色谱,假若数量不足,会重新使用开头的起始颜色连续填充 |
| FromSchema | 1 | Designer.FromSchema())和Designer.FromNames())适用于函数绘图之类需要区分数据系列的颜色谱的生成 |
| Colors | 1 | ColorCube.GetColorSequence()) Some useful color tables for images and tools to handle them. |
| CubicSpline | 1 | 这个函数并不会计算alpha的值 |
| rangeConstraint | 1 | Limit Designer.CubicSpline()) result in range [0, 255] |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| AvailableInterpolates | 1 | { "Color [PapayaWhip]": [ { "knownColor": 93, "name": null, "state": 1, "value": 0 }, { "knownColor": 119, "name": null, "… |
| ConsoleColors | 1 | 16 console colors |
| MaterialPalette | 1 | 20 Google material design colors |
| ColorBrewer | 1 | |
| Category31 | 1 | |
| Typhoon | 1 |
04 Fields
| Name | Overloads | Summary |
|---|---|---|
| Clusters | 1 | Designer.GetColors()) schema name for color profile: CustomDesigns.ClusterColour(). |
| allColorMapNames | 1 | ColorMap pattern names |
| colorRegistry | 1 | registry for external color palette |
05 Members
ConsoleColor)将ConsoleColor枚举值转换为gdi+颜色对象
| Name | Type | Description |
|---|---|---|
color | ConsoleColor | - |
2017-9-7
mono的Json反序列化任然存在问题
[ERROR 2017/9/7 10:03:20] <Print>::System.Exception: Print ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Microsoft.VisualBasic.Imaging.Drawing2D.Colors.Designer' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Value cannot be null. Parameter name : key at System.Collections.Generic.Dictionary2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x00008] In <902ab9e386384bec9c07fa19aa938869>:0 at System.Collections.Generic.Dictionary2[TKey,TValue].Add (TKey key, TValue value) [0x00000] In <902ab9e386384bec9c07fa19aa938869>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] In <902ab9e386384bec9c07fa19aa938869>:0 --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] In <902ab9e386384bec9c07fa19aa938869>:0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] In <902ab9e386384bec9c07fa19aa938869>:0 at System.Runtime.Serialization.Json.JsonFormatReaderInterpreter.ReadSimpleDictionary (System.Runtime.Serialization.CollectionDataContract collectionContract, System.Type keyValueType) [0x0014a] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.Json.JsonFormatReaderInterpreter.ReadCollection (System.Runtime.Serialization.CollectionDataContract collectionContract) [0x000fe] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.Json.JsonFormatReaderInterpreter.ReadCollectionFromJson (System.Runtime.Serialization.XmlReaderDelegator xmlReader, System.Runtime.Serialization.Json.XmlObjectSerializerReadContextComplexJson context, System.Xml.XmlDictionaryString emptyDictionaryString, System.Xml.XmlDictionaryString itemName, System.Runtime.Serialization.CollectionDataContract collectionContract) [0x00025] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.Json.JsonFormatReaderGenerator+CriticalHelper+<>cDisplayClass1_0.<GenerateCollectionReader>b0 (System.Runtime.Serialization.XmlReaderDelegator xr, System.Runtime.Serialization.Json.XmlObjectSerializerReadContextComplexJson ctx, System.Xml.XmlDictionaryString emptyDS, System.Xml.XmlDictionaryString inm, System.Runtime.Serialization.CollectionDataContract cc) [0x0000c] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.Json.JsonCollectionDataContract.ReadJsonValueCore (System.Runtime.Serialization.XmlReaderDelegator jsonReader, System.Runtime.Serialization.Json.XmlObjectSerializerReadContextComplexJson context) [0x0004f] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.Json.JsonDataContract.ReadJsonValue (System.Runtime.Serialization.XmlReaderDelegator jsonReader, System.Runtime.Serialization.Json.XmlObjectSerializerReadContextComplexJson context) [0x00007] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadJsonValue (System.Runtime.Serialization.DataContract contract, System.Runtime.Serialization.XmlReaderDelegator reader, System.Runtime.Serialization.Json.XmlObjectSerializerReadContextComplexJson context) [0x00006] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.Json.XmlObjectSerializerReadContextComplexJson.ReadDataContractValue (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlReaderDelegator reader) [0x00000] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize (System.Runtime.Serialization.XmlReaderDelegator reader, System.String name, System.String ns, System.Type declaredType, System.Runtime.Serialization.DataContract& dataContract) [0x00264] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize (System.Runtime.Serialization.XmlReaderDelegator xmlReader, System.Type declaredType, System.Runtime.Serialization.DataContract dataContract, System.String name, System.String ns) [0x0000b] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserialize (System.Runtime.Serialization.XmlReaderDelegator xmlReader, System.Type declaredType, System.Runtime.Serialization.DataContract dataContract, System.String name, System.String ns) [0x00010] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalReadObject (System.Runtime.Serialization.XmlReaderDelegator xmlReader, System.Boolean verifyObjectName) [0x000c5] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.XmlObjectSerializer.InternalReadObject (System.Runtime.Serialization.XmlReaderDelegator reader, System.Boolean verifyObjectName, System.Runtime.Serialization.DataContractResolver dataContractResolver) [0x00000] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions (System.Runtime.Serialization.XmlReaderDelegator reader, System.Boolean verifyObjectName, System.Runtime.Serialization.DataContractResolver dataContractResolver) [0x00072] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions (System.Runtime.Serialization.XmlReaderDelegator reader, System.Boolean verifyObjectName) [0x00000] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject (System.Xml.XmlDictionaryReader reader) [0x0000d] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject (System.IO.Stream stream) [0x00017] In <8a29d8bc61874dfaa700acd3dd58b577>:0 at Microsoft.VisualBasic.Serialization.JSON.JsonContract.LoadObject (System.String json, System.Type type, System.Boolean simpleDict) [0x0003e] In <fb45d3e2e23e49ecae88d0914baf5cb7>:0 at Microsoft.VisualBasic.Serialization.JSON.JsonContract.LoadObject[T] (System.String json, System.Boolean simpleDict) [0x00000] In <fb45d3e2e23e49ecae88d0914baf5cb7>:0 at Microsoft.VisualBasic.Imaging.Drawing2D.Colors.Designer..cctor () [0x0040f] In <fe90788c758b4b75b8659df0623dea4b>:0 --- End of inner exception stack trace --- at json.Program.Convert (System.String In, System.String nodesTable, System.String kegKCF, System.Boolean degreeSize, System.Boolean compress, System.String style, System.Boolean nodeID, System.String[] maps) [0x00058] In <f0aa82bd17214027b520f8953095c372>:0 at Biodeep.KEGG.Network.Common.KEGG.BuildNetworkJSON (System.Collections.Generic.IEnumerable`1[T] compounds, System.String repo, System.String out, System.String[] mapIDs) [0x00145] In <598a64b776e440d8b3f5e763e2b2cdd0>:0 at cytonetwork.Program.BiodeepKEGGNetwork (Microsoft.VisualBasic.CommandLine.CommandLine args) [0x000c1] In <2ebe3e57fb4d4cafb0d4cd22a0a764c2>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] In <902ab9e386384bec9c07fa19aa938869>:0 --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] In <902ab9e386384bec9c07fa19aa938869>:0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] In <902ab9e386384bec9c07fa19aa938869>:0 at Microsoft.VisualBasic.CommandLine.Reflection.EntryPoints.APIEntryPoint.__directInvoke (System.Object[] callParameters, System.Object target, System.Boolean Throw) [0x0000c] In <fb45d3e2e23e49ecae88d0914baf5cb7>:0 --- End of inner exception stack trace ---
String)在这个函数里,需要保证颜色的顺序和表达式之中所输入的顺序一致
这个函数不支持rgb表达式与颜色名称,html颜色表达式混合
| Name | Type | Description |
|---|---|---|
expr | String | - |
String)a unify method for get color maps.
(对于无效的键名称,默认是返回DesignerTerms.Office2016,请注意, 如果是所有的.net的颜色的话,这里面还会包含有白色,所以还需要手工 去除掉白色)
| Name | Type | Description |
|---|---|---|
exp$ | String | DesignerExpression. (假若这里所输入的是一组颜色值,则必须是htmlcolor或者颜色名称,RGB表达式将不会被允许) |
String, Int32, Int32)这个函数是获取得到一个连续的颜色谱
create color profile with Designer.CubicSpline().
| Name | Type | Description |
|---|---|---|
term | String | - |
n | Int32 | negative or zero value means no interoplation, just returns the raw color list which is mapping by the term |
alpha | Int32 | the transparency alpha channel data |
String, Color())register a custom color palette
| Name | Type | Description |
|---|---|---|
colorName | String | - |
colors | Color() | - |
register an external custom color palette function
| Name | Type | Description |
|---|---|---|
external | TryGetExternalColorPalette | - |
String)a unify method for get color maps
| Name | Type | Description |
|---|---|---|
term$ | String | - |
String, Int32, Int32)New [SolidBrush](cref:T:Microsoft.VisualBasic.Imaging.SolidBrush)([Designer.GetColors()](cref:M:Microsoft.VisualBasic.Imaging.Drawing2D.Colors.Designer.GetColors(System.String,System.Int32,System.Int32)))
| Name | Type | Description |
|---|---|---|
term$ | String | - |
n% | Int32 | - |
alpha% | Int32 | - |
String(), Int32)相对于Designer.GetColors()函数而言,这个函数是返回非连续的颜色谱,假若数量不足,会重新使用开头的起始颜色连续填充
| Name | Type | Description |
|---|---|---|
colors$ | String() | - |
n% | Int32 | - |
String, Int32)Designer.FromSchema()和Designer.FromNames()适用于函数绘图之类需要区分数据系列的颜色谱的生成
| Name | Type | Description |
|---|---|---|
term$ | String | - |
n% | Int32 | - |
Color(), Int32, Int32)ColorCube.GetColorSequence()
Some useful color tables for images and tools to handle them. Several color scales useful for image plots: a pleasing rainbow style color table patterned after that used in Matlab by Tim Hoar and also some simple color interpolation schemes between two or more colors. There is also a function that converts between colors and a real valued vector.
| Name | Type | Description |
|---|---|---|
col | Color() | A list of colors (names or hex values) to interpolate. |
n | Int32 | Number of color levels. The setting n=64 is the orignal definition. |
alpha | Int32 | The transparency of the color – 255 is opaque and 0 is transparent. This is useful for overlays of color and still being able to view the graphics that is covered. |
A vector giving the colors in a hexadecimal format, two extra hex digits are added for the alpha channel.
IEnumerable(Of Color), Int32, Int32, Boolean)这个函数并不会计算alpha的值
if the n value less than the collection size of the input colors, then top n colors will be takes from the input color.
| Name | Type | Description |
|---|---|---|
colors | IEnumerable(Of Color) | - |
n | Int32 | 所期望的颜色的数量 |
interpolate | Int32 | set the interpolate parameter to value TRUE if apply the function for the scalar palette, otherwise keeps the default value FALSE for deal with the category color palette. |
Single)Limit Designer.CubicSpline() result in range [0, 255]
| Name | Type | Description |
|---|---|---|
x! | Single | - |
{ "Color [PapayaWhip]": [ { "knownColor": 93, "name": null, "state": 1, "value": 0 }, { "knownColor": 119, "name": null, "state": 1, "value": 0 }, { "knownColor": 30, "name": null, "state": 1, "value": 0 }, { "knownColor": 165, "name": null, "state": 1, "value": 0 }, { "knownColor": 81, "name": null, "state": 1, "value": [rest of string was truncated]";.
16 console colors
20 Google material design colors
Designer.GetColors() schema name for color profile: CustomDesigns.ClusterColour().
ColorMap pattern names
registry for external color palette