Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
rgb vs rgba vs hex with opacity canvas
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0
Browser:
Chrome 142
Operating system:
Windows
Device Platform:
Desktop
Date tested:
5 months ago
Test name
Executions per second
alpha
3230288.2 Ops/sec
no alpha
3184241.8 Ops/sec
hex
3309036.5 Ops/sec
HTML Preparation code:
<canvas id="canvasOne" width="400" height="400"></canvas> <canvas id="canvasTwo" width="400" height="400"></canvas> <canvas id="canvasThr" width="400" height="400"></canvas>
Script Preparation code:
var canvasOne = document.getElementById("canvasOne"); var ctxOne = canvasOne.getContext("2d"); var canvasTwo = document.getElementById("canvasTwo"); var ctxTwo = canvasTwo.getContext("2d"); var canvasThr = document.getElementById("canvasThr"); var ctxThr = canvasThr.getContext("2d");
Tests:
alpha
ctxOne.beginPath(); ctxOne.fillStyle = 'rgba(231, 76, 60, 0.1)'; ctxTwo.arc(200, 200, 100, 0, Math.PI * 2, true); ctxOne.fill();
no alpha
ctxTwo.beginPath(); ctxTwo.fillStyle = 'rgb(249, 206, 201)'; ctxTwo.arc(200, 200, 100, 0, Math.PI * 2, true); ctxTwo.fill();
hex
ctxTwo.beginPath(); ctxTwo.fillStyle = '#1e222ea6'; ctxTwo.arc(200, 200, 100, 0, Math.PI * 2, true); ctxTwo.fill();