Skip to main content
torch.js has not been released yet.
torch.js logotorch.js logotorch.js
PlaygroundContact
Login
Documentation
IntroductionType SafetyTensor ExpressionsTensor IndexingEinsumEinopsAutogradTraining a ModelProfiling & MemoryPyTorch MigrationBest PracticesRuntimesPerformancePyTorch CompatibilityBenchmarksDType Coverage
IntroductionRenderer GalleryRenderersAnalysis
getColormapShaderCodeColormapNameColormapOptions
torch.js· 2026
LegalTerms of UsePrivacy Policy
/
/
  1. docs
  2. viz
  3. viz
  4. colormaps
  5. ColormapOptions

viz.colormaps.ColormapOptions

export interface ColormapOptions {
  /** Colormap name */
  name: ColormapName;
  /** Reverse the colormap direction */
  reverse?: boolean;
  /** For categorical: number of distinct colors */
  numCategories?: number;
}
name(ColormapName)
– Colormap name
reverse(boolean)optional
– Reverse the colormap direction
numCategories(number)optional
– For categorical: number of distinct colors
Previous
ColormapName
Next
getColormapShaderCode