from_rgb method

On this page

from_rgb

Creates an Argb32Color value from specified Red, Green, Blue channels, with the Alpha channel set to fully opaque.

def from_rgb(cls, red, green, blue):
    ...
Parameter Type Description
red int Red channel value.
green int Green channel value.
blue int Blue channel value.

Returns: Argb32Color: New Argb32Color value.

Example

from groupdocs.viewer import Viewer
from groupdocs.viewer.options import PdfViewOptions
from groupdocs.viewer.drawing import Argb32Color

with Viewer("sample.dwg") as viewer:
    view_options = PdfViewOptions("output.pdf")
    view_options.cad_options.background_color = Argb32Color.from_rgb(255, 255, 0)  # yellow
    viewer.view(view_options)

See Also

On this page