Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a226d0955952f41a

Jump to content

Template talk:Colort/Color

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia

RGB percentages a bad idea, probably even worse than HSL/HSV

[edit]

The RGB percentages do not add anything to the hex code. These, being computed directly by (sRGB/255), are also wrong because you don't do math in a space that is not linear.

The HSL/HSV bits are well, also bad for the same reason, but at least these can be justified on the basis of "this is how they used to choose colors". RGB percentages are not as commonly used for this purpose. Artoria2e5 🌉 10:25, 4 April 2023 (UTC)Reply

This template was originally written in 2006 and has hardly been edited since 2013. At the time, CSS and the Web didn’t care much about anything but sRGB in its various representation formats.
If you look at some tables that use this template, you’ll notice several named colors were obviously created by choosing round R, G, B percentage values. (They might not have used sRGB, but weren’t adapted later either.) Hex codes don’t bring much new to the table, indeed, except for the occasional leet-speak #c0ffee.
Like CSS, nowadays, I’d probably prefer different or additional representations in those tables. They should be calculated by a Lua module. At first sight, Module:Color looks like it can do everything this template does now, but not everything that one might want.
If you think you can improve it without breaking articles, go ahead. — Christoph Päper 13:54, 4 April 2023 (UTC)Reply