Constructor
new CustomLinear(min, max, colors)
Parameters:
Name | Type | Description |
---|---|---|
min | number | |
max | number | |
colors | Array | Array of colors that will be linearly interpolated between from min to max values. |
- Source
Example
$3Dmol.get('../test_structs/af.pdb', function(data){
viewer.addModel(data);
viewer.setStyle({cartoon:{colorscheme:{prop: 'b', gradient:'linear', min: 70, max: 100, colors: ["blue","yellow","green"]}}});
viewer.zoomTo();
viewer.render();
});