MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / _hexToRgb

Method _hexToRgb

src/tools/texture-lab/renderer.js:1198–1202  ·  view source on GitHub ↗
(hex)

Source from the content-addressed store, hash-verified

1196 }
1197
1198 _hexToRgb(hex) {
1199 const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex || '#000000');
1200 if (!result) return [0, 0, 0];
1201 return [parseInt(result[1], 16) / 255, parseInt(result[2], 16) / 255, parseInt(result[3], 16) / 255];
1202 }
1203
1204 destroy() {
1205 const gl = this.gl;

Callers 7

_renderHalftoneMethod · 0.95
_renderAsciiMethod · 0.95
_renderVignetteMethod · 0.95
_renderColorGradeMethod · 0.95
_renderDuotoneMethod · 0.95
_renderLightLeakMethod · 0.95
_renderMosaicMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected