Platforms to show: All Mac Windows Linux Cross-Platform

Back to GM16ColorMBS class.

GM16ColorMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new color with transparent black.
Example
dim c as new GM16ColorMBS
MsgBox str(c.redQuantum)+" "+str(c.greenQuantum)+" "+str(c.blueQuantum)

See also:

GM16ColorMBS.Constructor(ColorName as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new color based on the X11 color name.
Example
dim c as new GM16ColorMBS("red")

MsgBox str(c.redQuantum)+"-"+str(c.greenQuantum)+"-"+str(c.blueQuantum) // shows "255-0-0"

dim d as new GM16ColorMBS("#77FF00")

MsgBox str(d.redQuantum)+"-"+str(d.greenQuantum)+"-"+str(d.blueQuantum) // shows "119-255-0"

An alternate way to construct the class is via an X11-compatible color specification string (e.g. Color("red") or Color ("#FF0000")). Since the class may be constructed from a string, convenient strings may be passed in place of an explicit Color object in methods which accept a reference to Color. Color may also be converted to a std::string for convenience in user interfaces, and for saving settings to a text file.

See also:

GM16ColorMBS.Constructor(ColorValue as color)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new color with the given values.
Example
dim c as new GM16ColorMBS(&cFF0000)
MsgBox str(c.redQuantum)+" "+str(c.greenQuantum)+" "+str(c.blueQuantum)

See also:

GM16ColorMBS.Constructor(ColorValue as color, alpha as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new color with the given values.
Example
dim c as new GM16ColorMBS(&cFF0102, 127)
MsgBox str(c.redQuantum)+" "+str(c.greenQuantum)+" "+str(c.blueQuantum)+" "+str(c.alpha)

See also:

GM16ColorMBS.Constructor(other as GM16ColorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new color copying the existing color.
Example
dim r as new GM16ColorMBS(1,2,3)
dim c as new GM16ColorMBS(r)
MsgBox str(C.redQuantum)+" "+str(c.greenQuantum)+" "+str(c.blueQuantum)

See also:

GM16ColorMBS.Constructor(red as Integer, green as Integer, blue as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new color with the given values.
Example
dim c as new GM16ColorMBS(1,2,3)
MsgBox str(C.redQuantum)+" "+str(c.greenQuantum)+" "+str(c.blueQuantum)

For 8-bit range is 0 to 255.
For 16-bit range is 0 to 65535.

See also:

GM16ColorMBS.Constructor(red as Integer, green as Integer, blue as Integer, alpha as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new color with the given values.
Example
dim c as new GM16ColorMBS(1,2,3,4)

// display color, alpha is double...
MsgBox str(C.redQuantum)+" "+str(c.greenQuantum)+" "+str(c.blueQuantum)+" "+str(c.alpha)

For 8-bit range is 0 to 255.
For 16-bit range is 0 to 65535.

See also:

The items on this page are in the following plugins: MBS GraphicsMagick Plugin.


The biggest plugin in space...