SBColorSchemeCPKConstantCarbons#

This class describes a color scheme that sets a specified color for carbons and colors from the the Corey-Pauling-Koltun (CPK) color scheme for other atom element types.

Please refer to samson.SBNodeColorScheme.

See also

SAMSON SDK: SBDColorSchemeCPKConstantCarbons

class samson.SBColorSchemeCPKConstantCarbons(*args, **kwargs)#

Bases: SBNodeColorScheme

This class describes a color scheme that sets a specified color for carbons and CPK colors for other atom element types.

Overloaded function.

  1. __init__(self: samson.SBColorSchemeCPKConstantCarbons) -> None

Constructs the color scheme with the white color (1.0, 1.0, 1.0, 1.0).

  1. __init__(self: samson.SBColorSchemeCPKConstantCarbons, red: float, green: float, blue: float, alpha: float = 1.0) -> None

Constructs the color scheme with the given color (red, green, blue, alpha). Arguments should be in the range [0.0, 1.0].

Parameters:
  • red (float) – The red component of RGB-color.

  • green (float) – The green component of RGB-color.

  • blue (float) – The blue component of RGB-color.

  • alpha (float, default=1.0) – The alpha component (transparency).

Examples

>>> colorScheme = SBColorSchemeCPKConstantCarbons(0.25, 0.5, 0.75, 1.0)
  1. __init__(self: samson.SBColorSchemeCPKConstantCarbons, red: int, green: int, blue: int, alpha: int = 255) -> None

Constructs the color scheme with the given color (red, green, blue, alpha). Arguments should be in the range [0, 255].

Parameters:
  • red (int) – The red component of RGB-color.

  • green (int) – The green component of RGB-color.

  • blue (int) – The blue component of RGB-color.

  • alpha (int, default=255) – The alpha component (transparency).

Examples

>>> colorScheme = SBColorSchemeCPKConstantCarbons(120, 160, 200, 255)
  1. __init__(self: samson.SBColorSchemeCPKConstantCarbons, color: samson.SBColor) -> None

Constructs the color scheme with the given color.

Parameters:

color (samson.SBColor) – A color