MarvinSketch Example 1.2

The color of the canvas can optionally be modified by applet parameters. By default it is set to white as shown in the example below.

<script LANGUAGE="JavaScript1.1" SRC="../../marvin.js"></script>
<script LANGUAGE="JavaScript1.1">
<!--
msketch_begin("../..", 540, 480);
msketch_param("molbg", "#ffffff");
msketch_end();
//-->
</script>
By default atoms and bonds drawn on the canvas are shown in the CPK color scheme, but the coloration can be disabled by using the colorScheme parameter. In the example below the color sheme is set to Monochrome, while the color of the canvas is set to black.

<script LANGUAGE="JavaScript1.1">
<!--
msketch_begin("../..", 540, 480);
msketch_param("molbg", "#000000");
msketch_param("colorScheme", "mono");
msketch_end();
//-->
</script>
Note that only the color of the canvas is defined by the parameter while the white foreground color is set automatically by the program.

 

In the next example, you can use My Templates.