Platforms to show: All Mac Windows Linux Cross-Platform

CGColorMBS.Black as CGColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreGraphics MBS MacCG Plugin 9.5 Yes No No Yes, macOS only No
Function: The black color in the Generic gray color space.

Feedback, Comments & Corrections

CGColorMBS.Clear as CGColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreGraphics MBS MacCG Plugin 9.5 Yes No No Yes, macOS only No
Function: The clear color in the Generic gray color space.

Feedback, Comments & Corrections

CGColorMBS.Create(colorspace as CGColorSpaceMBS, components as memoryblock) as CGColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreGraphics MBS MacCG Plugin 9.5 Yes No No Yes, macOS only No
Function: Creates a new color with the given components.
Example:
dim c as color = &cFF0000

Dim m As MemoryBlock

m=NewMemoryBlock(16)
m.SingleValue(0)=c.Red/256
m.SingleValue(4)=c.Green/256
m.SingleValue(8)=c.Blue/256
m.SingleValue(12)=1.0

dim colorspace as CGColorSpaceMBS

colorspace=CGColorSpaceMBS.CreateDeviceRGB

if colorspace=nil or colorspace.Handle=0 then
MsgBox "Failed to get RGB color space!"
Return
end if

Dim col As CGColorMBS

col=CGColorMBS.Create(colorspace, m)

if col=nil or col.Handle=0 then
MsgBox "Failed to create color."
Return
end if

MsgBox str(Col.NumberOfComponents)
Notes: This method was called NewCGColorMBS in earlier MBS Plugins.

See also:

Feedback, Comments & Corrections

CGColorMBS.Create(colorspace as CGColorSpaceMBS, components() as Double) as CGColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreGraphics MBS MacCG Plugin 13.1 Yes No No Yes, macOS only No
Function: Creates a new color with the given components.
Notes:
Supports up to 32 components.
Returns nil on any error.

See also:

Feedback, Comments & Corrections

CGColorMBS.CreateDeviceCMYK(cyan as Double, magenta as Double, yellow as Double, black as Double, alpha as Double = 1.0) as CGColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreGraphics MBS MacCG Plugin 13.1 Yes No No Yes, macOS only No
Function: Creates a color in the device CMYK color space.
Notes:
cyan: A cyan value (0.0 - 1.0).
magenta: A magenta value (0.0 - 1.0).
yellow: A yellow value (0.0 - 1.0).
black: A black value (0.0 - 1.0).
alpha: An alpha value (0.0 - 1.0).

Returns a color object.

Feedback, Comments & Corrections

CGColorMBS.CreateDeviceGray(gray as Double, alpha as Double = 1.0) as CGColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreGraphics MBS MacCG Plugin 13.1 Yes No No Yes, macOS only No
Function: Creates a color in the device gray color space.
Notes:
gray: A grayscale value (0.0 - 1.0).
alpha: An alpha value (0.0 - 1.0).

Returns a color object.

Feedback, Comments & Corrections

CGColorMBS.CreateDeviceRGB(red as Double, green as Double, blue as Double, alpha as Double = 1.0) as CGColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreGraphics MBS MacCG Plugin 13.1 Yes No No Yes, macOS only No
Function: Creates a color in the device RGB color space.
Notes:
red: A red component value (0.0 - 1.0).
green: A green component value (0.0 - 1.0).
blue: A blue component value (0.0 - 1.0).
alpha: An alpha value (0.0 - 1.0).

Returns a new color object.

Feedback, Comments & Corrections

CGColorMBS.CreateGenericCMYK(cyan as Double, magenta as Double, yellow as Double, black as Double, alpha as Double = 1.0) as CGColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreGraphics MBS MacCG Plugin 9.5 Yes No No Yes, macOS only No
Function: Creates a color in the Generic CMYK color space.
Notes:
cyan: A cyan value (0.0 - 1.0).
magenta: A magenta value (0.0 - 1.0).
yellow: A yellow value (0.0 - 1.0).
black: A black value (0.0 - 1.0).
alpha: An alpha value (0.0 - 1.0).

Returns a color object.
Available in Mac OS X v10.5 and later.

Feedback, Comments & Corrections

CGColorMBS.CreateGenericGray(gray as Double, alpha as Double = 1.0) as CGColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreGraphics MBS MacCG Plugin 9.5 Yes No No Yes, macOS only No
Function: Creates a color in the Generic gray color space.
Notes:
gray: A grayscale value (0.0 - 1.0).
alpha: An alpha value (0.0 - 1.0).

Returns a color object.
Available in Mac OS X v10.5 and later.

Feedback, Comments & Corrections

CGColorMBS.CreateGenericRGB(red as Double, green as Double, blue as Double, alpha as Double = 1.0) as CGColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreGraphics MBS MacCG Plugin 9.5 Yes No No Yes, macOS only No
Function: Creates a color in the Generic RGB color space.
Notes:
red: A red component value (0.0 - 1.0).
green: A green component value (0.0 - 1.0).
blue: A blue component value (0.0 - 1.0).
alpha: An alpha value (0.0 - 1.0).

Returns a new color object.
Available in Mac OS X v10.5 and later.

Feedback, Comments & Corrections

CGColorMBS.White as CGColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method CoreGraphics MBS MacCG Plugin 9.5 Yes No No Yes, macOS only No
Function: The white color in the Generic gray color space.

Feedback, Comments & Corrections

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

The biggest plugin in space...




Links
MBS Xojo Chart Plugins