MCPcopy Create free account
hub / github.com/Kitware/VTK / hexToRgb

Function hexToRgb

Examples/Emscripten/Cxx/GeometryViewer/web/hexToRgb.js:6–12  ·  view source on GitHub ↗
(hex)

Source from the content-addressed store, hash-verified

4 * @returns {number[]} An array containing the red, green, and blue components.
5 */
6export function hexToRgb(hex) {
7 const r = (hex >> 16) & 255;
8 const g = (hex >> 8) & 255;
9 const b = hex & 255;
10
11 return [r, g, b];
12}

Callers 1

setupUIFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected