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. getColormapShaderCode

viz.colormaps.getColormapShaderCode

function getColormapShaderCode(): string

Get the WGSL colormap shader code. This can be included in other shaders.

Returns

string
Previous
ColormapOptions
Next
animate