Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
rgba vs rgb vs hex canvas
(version: 5)
fork of "rgb vs rgba vs hex canvas"
Comparing performance of:
rgba vs rgb vs hex
Created:
3 years ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<canvas id="hex" width="64" height="64"></canvas> <canvas id="rgb" width="64" height="64"></canvas> <canvas id="rgba" width="64" height="64"></canvas>
Script Preparation code:
var hex = document.getElementById(`hex`) var ctxHex = hex.getContext(`2d`) var rgb = document.getElementById(`rgb`) var ctxRgb = rgb.getContext(`2d`) var rgba = document.getElementById(`rgba`) var ctxRgba = rgba.getContext(`2d`)
Tests:
rgba
ctxRgba.clearRect(0, 0, rgba.width, rgba.height) ctxRgba.fillStyle = `rgba(38, 139, 210, 0.5)` ctxRgba.fillRect(0,0, rgba.width, rgba.height)
rgb
ctxRgb.clearRect(0, 0, rgb.width, rgb.height) ctxRgb.fillStyle = `rgb(38, 139, 210)` ctxRgb.fillRect(0, 0, rgb.width, rgb.height)
hex
ctxHex.clearRect(0, 0, hex.width, hex.height) ctxHex.fillStyle = `#268bd2` ctxHex.fillRect(0, 0, hex.width, hex.height)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
rgba
rgb
hex
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
rgb vs rgba (1 & 0.5) vs hex canvas
RGB vs RGBa vs HSL vs Hex using Canvas v2
RGB vs RGBa vs HSL vs Hex using Canvas (alpha: false)
RGB vs RGBa vs HSL vs Hex using Canvas with alpha = false
Comments
Confirm delete:
Do you really want to delete benchmark?