MDN self-hosted library · e01.org

WebGLRenderingContext: clearColor() method

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
gl.clearColor(1, 0.5, 0.5, 1);
js
gl.getParameter(gl.COLOR_CLEAR_VALUE);
// Float32Array[1, 0.5, 0.5, 1]